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