mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-12-01 11:13:40 +03:00
* feat(tauri): impl Send for app::Builder * chore: add .changes/app-builder-send.md
This commit is contained in:
parent
04949d1658
commit
8a6766173b
5
.changes/app-builder-send.md
Normal file
5
.changes/app-builder-send.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"tauri": patch:enhance
|
||||||
|
---
|
||||||
|
|
||||||
|
Ensure Builder is Send by requiring the menu closure to be Send.
|
@ -997,7 +997,7 @@ pub struct Builder<R: Runtime> {
|
|||||||
|
|
||||||
/// A closure that returns the menu set to all windows.
|
/// A closure that returns the menu set to all windows.
|
||||||
#[cfg(desktop)]
|
#[cfg(desktop)]
|
||||||
menu: Option<Box<dyn FnOnce(&AppHandle<R>) -> crate::Result<Menu<R>>>>,
|
menu: Option<Box<dyn FnOnce(&AppHandle<R>) -> crate::Result<Menu<R>> + Send>>,
|
||||||
|
|
||||||
/// Enable macOS default menu creation.
|
/// Enable macOS default menu creation.
|
||||||
#[allow(unused)]
|
#[allow(unused)]
|
||||||
@ -1295,7 +1295,7 @@ impl<R: Runtime> Builder<R> {
|
|||||||
/// ```
|
/// ```
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[cfg(desktop)]
|
#[cfg(desktop)]
|
||||||
pub fn menu<F: FnOnce(&AppHandle<R>) -> crate::Result<Menu<R>> + 'static>(
|
pub fn menu<F: FnOnce(&AppHandle<R>) -> crate::Result<Menu<R>> + Send + 'static>(
|
||||||
mut self,
|
mut self,
|
||||||
f: F,
|
f: F,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
|
Loading…
Reference in New Issue
Block a user