diff --git a/src/decoder/tiling.rs b/src/decoder/tiling.rs index 81a1f79..48d4bed 100644 --- a/src/decoder/tiling.rs +++ b/src/decoder/tiling.rs @@ -117,7 +117,7 @@ impl Tile { snapshot.append_scaled_texture(&self.texture, options.scaling_filter, &area_with_bleed); snapshot.pop(); - if std::env::var_os("LOUPE_TILING_DEBUG").is_some_and(|x| x.len() > 0) { + if std::env::var_os("LOUPE_TILING_DEBUG").is_some_and(|x| !x.is_empty()) { snapshot.append_inset_shadow( &gsk::RoundedRect::from_rect(area, 0.), &gdk::RGBA::new(1., 0., 0., 0.7), diff --git a/src/widgets/image_window.rs b/src/widgets/image_window.rs index 0d30075..24500a4 100644 --- a/src/widgets/image_window.rs +++ b/src/widgets/image_window.rs @@ -922,7 +922,7 @@ impl LpImageWindow { } fn on_fullscreen_changed(&self) { - let is_fullscreen = self.try_window().map_or(false, |w| w.is_fullscreen()); + let is_fullscreen = self.try_window().is_some_and(|w| w.is_fullscreen()); let icon = if is_fullscreen { "view-restore-symbolic" @@ -948,7 +948,7 @@ impl LpImageWindow { } fn is_content_extended_to_top(&self) -> bool { - self.try_window().map_or(false, |w| w.is_fullscreen()) + self.try_window().is_some_and(|w| w.is_fullscreen()) && !self.imp().properties_button.is_active() }