From bf43337a30662ae14511f8085f21acaa02d44264 Mon Sep 17 00:00:00 2001 From: drendog Date: Wed, 5 Nov 2025 07:43:11 +0100 Subject: [PATCH] refactor: minor changes --- composition/src/system.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/composition/src/system.rs b/composition/src/system.rs index d49f7cb..059a6ae 100644 --- a/composition/src/system.rs +++ b/composition/src/system.rs @@ -25,7 +25,7 @@ use std::rc::{Rc, Weak}; use std::result::Result as StdResult; use std::time::{Duration, Instant}; -enum PopupCommand { +pub enum PopupCommand { Show(PopupRequest), Close(PopupHandle), Resize { key: usize, width: f32, height: f32 }, @@ -254,9 +254,8 @@ impl RuntimeState<'_> { })?; let current_size = request.size.dimensions(); - let size_changed = current_size.map_or(true, |(w, h)| { - (w - width).abs() > 0.01 || (h - height).abs() > 0.01 - }); + let size_changed = + current_size.is_none_or(|(w, h)| (w - width).abs() > 0.01 || (h - height).abs() > 0.01); let needs_repositioning = request.mode.center_x() || request.mode.center_y();