diff --git a/.changes/app-builder-send.md b/.changes/app-builder-send.md new file mode 100644 index 000000000000..479dbad7d5ab --- /dev/null +++ b/.changes/app-builder-send.md @@ -0,0 +1,5 @@ +--- +"tauri": patch:enhance +--- + +Ensure Builder is Send by requiring the menu closure to be Send. diff --git a/core/tauri/src/app.rs b/core/tauri/src/app.rs index 2cd80bdeee44..036ba89cfa54 100644 --- a/core/tauri/src/app.rs +++ b/core/tauri/src/app.rs @@ -997,7 +997,7 @@ pub struct Builder { /// A closure that returns the menu set to all windows. #[cfg(desktop)] - menu: Option) -> crate::Result>>>, + menu: Option) -> crate::Result> + Send>>, /// Enable macOS default menu creation. #[allow(unused)] @@ -1295,7 +1295,7 @@ impl Builder { /// ``` #[must_use] #[cfg(desktop)] - pub fn menu) -> crate::Result> + 'static>( + pub fn menu) -> crate::Result> + Send + 'static>( mut self, f: F, ) -> Self {