Skip to content

Commit

Permalink
fix(core): drop all plugin builder Sync requirements (#3490)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog authored Feb 17, 2022
1 parent 163c4e8 commit b8e4d65
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .changes/fix-drop-sync.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"tauri": patch
---

Callbacks passed to `tauri::plugin::Builder::setup` or `tauri::plugin::Builder::setup_with_config` are no longer required to implement `Sync`.
`tauri::plugin::Builder` closures are no longer required to implement `Sync`.
6 changes: 3 additions & 3 deletions core/tauri/src/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ pub trait Plugin<R: Runtime>: Send {

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

/// Builds a [`TauriPlugin`].
///
Expand Down

0 comments on commit b8e4d65

Please sign in to comment.