From f0973f6cf6c8a03fdd46dd627618234beec920c8 Mon Sep 17 00:00:00 2001 From: Christopher Davis Date: Wed, 29 Jun 2022 20:09:45 -0400 Subject: [PATCH] window: map().flatten() -> and_then() Per clippy lints --- src/window.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/window.rs b/src/window.rs index 762e99f..dd8a5f6 100644 --- a/src/window.rs +++ b/src/window.rs @@ -112,7 +112,7 @@ mod imp { }); klass.install_action("win.show-toast", Some("(si)"), move |win, _, var| { - if let Some((ref toast, i)) = var.map(|v| v.get::<(String, i32)>()).flatten() { + if let Some((ref toast, i)) = var.and_then(|v| v.get::<(String, i32)>()) { win.show_toast(toast, adw::ToastPriority::__Unknown(i)); } });