File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ " tauri " : " patch"
3+ ---
4+
5+ ` Builder#setup ` closure type changed from ` Fn ` to ` FnOnce ` .
Original file line number Diff line number Diff line change @@ -677,7 +677,7 @@ impl<R: Runtime> Builder<R> {
677677 /// Defines the setup hook.
678678 pub fn setup < F > ( mut self , setup : F ) -> Self
679679 where
680- F : Fn ( & mut App < R > ) -> Result < ( ) , Box < dyn std:: error:: Error + Send > > + Send + ' static ,
680+ F : FnOnce ( & mut App < R > ) -> Result < ( ) , Box < dyn std:: error:: Error + Send > > + Send + ' static ,
681681 {
682682 self . setup = Box :: new ( setup) ;
683683 self
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ use tauri_macros::default_runtime;
1616
1717/// A closure that is run when the Tauri application is setting up.
1818pub type SetupHook < R > =
19- Box < dyn Fn ( & mut App < R > ) -> Result < ( ) , Box < dyn std:: error:: Error + Send > > + Send > ;
19+ Box < dyn FnOnce ( & mut App < R > ) -> Result < ( ) , Box < dyn std:: error:: Error + Send > > + Send > ;
2020
2121/// A closure that is run everytime Tauri receives a message it doesn't explicitly handle.
2222pub type InvokeHandler < R > = dyn Fn ( Invoke < R > ) + Send + Sync + ' static ;
You can’t perform that action at this time.
0 commit comments