diff --git a/.changes/default-generic-for-menu.md b/.changes/default-generic-for-menu.md new file mode 100644 index 000000000..3e42d4bde --- /dev/null +++ b/.changes/default-generic-for-menu.md @@ -0,0 +1,5 @@ +--- +'tauri': patch:enhance +--- + +Provide a default for the runtime generic on `Menu`, `MenuItem`, `Submenu`, `PredefinedMenuItem`, `CheckMenuItem` and `IconMenuItem`. diff --git a/.changes/default-generic-for-tray.md b/.changes/default-generic-for-tray.md new file mode 100644 index 000000000..ca29a89fa --- /dev/null +++ b/.changes/default-generic-for-tray.md @@ -0,0 +1,5 @@ +--- +'tauri': patch:enhance +--- + +Provide a default for the runtime generic on `TrayIcon`. diff --git a/core/tauri/src/menu/mod.rs b/core/tauri/src/menu/mod.rs index de1bf7870..9d9c7059c 100644 --- a/core/tauri/src/menu/mod.rs +++ b/core/tauri/src/menu/mod.rs @@ -70,6 +70,7 @@ macro_rules! gen_wrappers { ),* ) => { $( + #[tauri_macros::default_runtime(crate::Wry, wry)] pub(crate) struct $inner { id: $crate::menu::MenuId, inner: ::std::option::Option<::muda::$type>, diff --git a/core/tauri/src/tray/mod.rs b/core/tauri/src/tray/mod.rs index 99f008002..66b9e2b83 100644 --- a/core/tauri/src/tray/mod.rs +++ b/core/tauri/src/tray/mod.rs @@ -243,6 +243,7 @@ impl TrayIconBuilder { /// This type is reference-counted and the icon is removed when the last instance is dropped. /// /// See [TrayIconBuilder] to construct this type. +#[tauri_macros::default_runtime(crate::Wry, wry)] pub struct TrayIcon { id: TrayIconId, inner: tray_icon::TrayIcon,