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:enhance"
3+ ---
4+
5+ Mark ` AppHandle::restart ` and ` process::restart ` as [ diverging functions] ( https://doc.rust-lang.org/rust-by-example/fn/diverging.html ) .
Original file line number Diff line number Diff line change @@ -417,7 +417,7 @@ impl<R: Runtime> AppHandle<R> {
417417 }
418418
419419 /// Restarts the app by triggering [`RunEvent::ExitRequested`] with code [`RESTART_EXIT_CODE`] and [`RunEvent::Exit`]..
420- pub fn restart ( & self ) {
420+ pub fn restart ( & self ) -> ! {
421421 if self . runtime_handle . request_exit ( RESTART_EXIT_CODE ) . is_err ( ) {
422422 self . cleanup_before_exit ( ) ;
423423 }
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ pub fn current_binary(_env: &Env) -> std::io::Result<PathBuf> {
7171/// Ok(())
7272/// });
7373/// ```
74- pub fn restart ( env : & Env ) {
74+ pub fn restart ( env : & Env ) -> ! {
7575 use std:: process:: { exit, Command } ;
7676
7777 if let Ok ( path) = current_binary ( env) {
You can’t perform that action at this time.
0 commit comments