Different approach to cfg
This commit is contained in:
1 file changed
+3
-1
@@ -4,9 +4,11 @@ use tao::window::Window;
|
|||||||
|
|
||||||
#[allow(unused)]
|
#[allow(unused)]
|
||||||
pub fn build_menu(window: &Window, default_menu_bar: bool) -> Option<Box<dyn Any>> {
|
pub fn build_menu(window: &Window, default_menu_bar: bool) -> Option<Box<dyn Any>> {
|
||||||
|
#[allow(unused_mut)]
|
||||||
let mut menu = None;
|
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<dyn Any>);
|
menu = Some(Box::new(impl_::build_menu_bar(default_menu_bar, window)) as Box<dyn Any>);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user