From 2e63356d2f9154d374f2f9084c57b48fe5558395 Mon Sep 17 00:00:00 2001 From: Vika Date: Wed, 9 Apr 2025 20:22:17 +0300 Subject: smart_summary: fix Clippy warnings --- src/components/smart_summary.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/components/smart_summary.rs') diff --git a/src/components/smart_summary.rs b/src/components/smart_summary.rs index 5b98186..de6eb91 100644 --- a/src/components/smart_summary.rs +++ b/src/components/smart_summary.rs @@ -228,7 +228,7 @@ impl Component for SmartSummaryButton { Input::ButtonPressed => { let settings = gio::Settings::new(crate::APPLICATION_ID); if !settings.get::("smart-summary-show-warning") { - return self.update(Input::WarningAccepted, sender, _root); + self.update(Input::WarningAccepted, sender, _root) } else { // TODO: show warning dialog let skip_warning_checkbox = gtk::CheckButton::with_label( @@ -258,11 +258,8 @@ impl Component for SmartSummaryButton { None::<&gio::Cancellable>, glib::clone!( #[strong] sender, - move |res| match res.as_str() { - "continue" => { - sender.input(Input::WarningAccepted); - }, - _ => {}, + move |res| if res.as_str() == "continue" { + sender.input(Input::WarningAccepted); } )) } -- cgit 1.4.1