Skip to content

Commit b8e4d65

Browse files
authored
fix(core): drop all plugin builder Sync requirements (#3490)
1 parent 163c4e8 commit b8e4d65

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.changes/fix-drop-sync.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
"tauri": patch
33
---
44

5-
Callbacks passed to `tauri::plugin::Builder::setup` or `tauri::plugin::Builder::setup_with_config` are no longer required to implement `Sync`.
5+
`tauri::plugin::Builder` closures are no longer required to implement `Sync`.

core/tauri/src/plugin.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ pub trait Plugin<R: Runtime>: Send {
5656

5757
type SetupHook<R> = dyn FnOnce(&AppHandle<R>) -> Result<()> + Send;
5858
type SetupWithConfigHook<R, T> = dyn FnOnce(&AppHandle<R>, T) -> Result<()> + Send;
59-
type OnWebviewReady<R> = dyn FnMut(Window<R>) + Send + Sync;
60-
type OnEvent<R> = dyn FnMut(&AppHandle<R>, &RunEvent) + Send + Sync;
61-
type OnPageLoad<R> = dyn FnMut(Window<R>, PageLoadPayload) + Send + Sync;
59+
type OnWebviewReady<R> = dyn FnMut(Window<R>) + Send;
60+
type OnEvent<R> = dyn FnMut(&AppHandle<R>, &RunEvent) + Send;
61+
type OnPageLoad<R> = dyn FnMut(Window<R>, PageLoadPayload) + Send;
6262

6363
/// Builds a [`TauriPlugin`].
6464
///

0 commit comments

Comments
 (0)