From 075caedf756b8b0629d48fa515ada196336078ed Mon Sep 17 00:00:00 2001 From: Jonathan Kelley Date: Thu, 11 Jan 2024 15:15:45 -0800 Subject: [PATCH] Different approach to make clippy happy across platforms --- packages/desktop/src/menubar.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/desktop/src/menubar.rs b/packages/desktop/src/menubar.rs index 9cc995011..8c9941cf8 100644 --- a/packages/desktop/src/menubar.rs +++ b/packages/desktop/src/menubar.rs @@ -4,15 +4,12 @@ use tao::window::Window; #[allow(unused)] pub fn build_menu(window: &Window, default_menu_bar: bool) -> Option> { - #[allow(unused_mut)] - let mut menu = None; - #[cfg(not(any(target_os = "ios", target_os = "android")))] { - menu = Some(Box::new(impl_::build_menu_bar(default_menu_bar, window)) as Box); + return Some(Box::new(impl_::build_menu_bar(default_menu_bar, window)) as Box); } - menu + None } #[cfg(not(any(target_os = "ios", target_os = "android")))]