Skip to content

armgit / Kooha

Public Imported from GitHub
0

Elegantly record your screen

refactor: fix clippy warnings

Dave Patrick Caberto4445d0004469
diff --git a/src/preferences_dialog.rs b/src/preferences_dialog.rs
index e55b6c9..c92f017 100644
--- a/src/preferences_dialog.rs
+++ b/src/preferences_dialog.rs
@@ -330,7 +330,7 @@ impl PreferencesDialog {
model
};
let filter = gtk::CustomFilter::new(move |obj| {
- profile_from_obj(obj).map_or(true, |profile| {
+ profile_from_obj(obj).is_none_or(|profile| {
(Feature::ExperimentalFormats.is_enabled()
|| !profile.is_experimental()
|| active_profile.is_some_and(|active_profile| active_profile == profile))
diff --git a/src/window/mod.rs b/src/window/mod.rs
index 0de61b2..f3e336e 100644
--- a/src/window/mod.rs
+++ b/src/window/mod.rs
@@ -567,7 +567,7 @@ impl Window {
let is_enabled = Application::get()
.settings()
.profile()
- .map_or(true, |profile| profile.supports_audio());
+ .is_none_or(|profile| profile.supports_audio());
self.action_set_enabled("win.record-desktop-audio", is_enabled);
self.action_set_enabled("win.record-microphone", is_enabled);