Different approach to cfg

This commit is contained in:
Jonathan Kelley 2024-01-11 15:14:45 -08:00
parent b90c7ffcac
commit ac64f40842
No known key found for this signature in database
GPG key ID: 1FBB50F7EB0A08BE

View file

@ -4,9 +4,11 @@ use tao::window::Window;
#[allow(unused)]
pub fn build_menu(window: &Window, default_menu_bar: bool) -> Option<Box<dyn Any>> {
#[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<dyn Any>);
}