@@ -21,8 +21,8 @@ use tauri_runtime::{
2121 WindowBuilderBase , WindowEvent , WindowId ,
2222 } ,
2323 DeviceEventFilter , Error , EventLoopProxy , ExitRequestedEventAction , Icon , Result , RunEvent ,
24- RunIteration , Runtime , RuntimeHandle , RuntimeInitArgs , UserAttentionType , UserEvent ,
25- WebviewDispatch , WindowDispatch , WindowEventId ,
24+ Runtime , RuntimeHandle , RuntimeInitArgs , UserAttentionType , UserEvent , WebviewDispatch ,
25+ WindowDispatch , WindowEventId ,
2626} ;
2727
2828#[ cfg( target_os = "macos" ) ]
@@ -2286,7 +2286,7 @@ impl<T: UserEvent> Runtime<T> for Wry<T> {
22862286 }
22872287
22882288 #[ cfg( desktop) ]
2289- fn run_iteration < F : FnMut ( RunEvent < T > ) + ' static > ( & mut self , mut callback : F ) -> RunIteration {
2289+ fn run_iteration < F : FnMut ( RunEvent < T > ) > ( & mut self , mut callback : F ) {
22902290 use tao:: platform:: run_return:: EventLoopExtRunReturn ;
22912291 let windows = self . context . main_thread . windows . clone ( ) ;
22922292 let webview_id_map = self . context . webview_id_map . clone ( ) ;
@@ -2296,8 +2296,6 @@ impl<T: UserEvent> Runtime<T> for Wry<T> {
22962296 #[ cfg( feature = "tracing" ) ]
22972297 let active_tracing_spans = self . context . main_thread . active_tracing_spans . clone ( ) ;
22982298
2299- let mut iteration = RunIteration :: default ( ) ;
2300-
23012299 let proxy = self . event_loop . create_proxy ( ) ;
23022300
23032301 self
@@ -2328,7 +2326,7 @@ impl<T: UserEvent> Runtime<T> for Wry<T> {
23282326 }
23292327 }
23302328
2331- iteration = handle_event_loop (
2329+ handle_event_loop (
23322330 event,
23332331 event_loop,
23342332 control_flow,
@@ -2341,8 +2339,6 @@ impl<T: UserEvent> Runtime<T> for Wry<T> {
23412339 } ,
23422340 ) ;
23432341 } ) ;
2344-
2345- iteration
23462342 }
23472343
23482344 fn run < F : FnMut ( RunEvent < T > ) + ' static > ( self , mut callback : F ) {
@@ -2392,7 +2388,7 @@ impl<T: UserEvent> Runtime<T> for Wry<T> {
23922388}
23932389
23942390pub struct EventLoopIterationContext < ' a , T : UserEvent > {
2395- pub callback : & ' a mut ( dyn FnMut ( RunEvent < T > ) + ' static ) ,
2391+ pub callback : & ' a mut ( dyn FnMut ( RunEvent < T > ) ) ,
23962392 pub webview_id_map : WindowIdStore ,
23972393 pub windows : Rc < RefCell < HashMap < WindowId , WindowWrapper > > > ,
23982394 #[ cfg( feature = "tracing" ) ]
@@ -2408,7 +2404,7 @@ fn handle_user_message<T: UserEvent>(
24082404 event_loop : & EventLoopWindowTarget < Message < T > > ,
24092405 message : Message < T > ,
24102406 context : UserMessageContext ,
2411- ) -> RunIteration {
2407+ ) {
24122408 let UserMessageContext {
24132409 webview_id_map,
24142410 windows,
@@ -2825,19 +2821,14 @@ fn handle_user_message<T: UserEvent>(
28252821
28262822 Message :: UserEvent ( _) => ( ) ,
28272823 }
2828-
2829- let it = RunIteration {
2830- window_count : windows. borrow ( ) . len ( ) ,
2831- } ;
2832- it
28332824}
28342825
28352826fn handle_event_loop < T : UserEvent > (
28362827 event : Event < ' _ , Message < T > > ,
28372828 event_loop : & EventLoopWindowTarget < Message < T > > ,
28382829 control_flow : & mut ControlFlow ,
28392830 context : EventLoopIterationContext < ' _ , T > ,
2840- ) -> RunIteration {
2831+ ) {
28412832 let EventLoopIterationContext {
28422833 callback,
28432834 webview_id_map,
@@ -2994,7 +2985,7 @@ fn handle_event_loop<T: UserEvent>(
29942985 }
29952986 Message :: UserEvent ( t) => callback ( RunEvent :: UserEvent ( t) ) ,
29962987 message => {
2997- return handle_user_message (
2988+ handle_user_message (
29982989 event_loop,
29992990 message,
30002991 UserMessageContext {
@@ -3010,15 +3001,10 @@ fn handle_event_loop<T: UserEvent>(
30103001 }
30113002 _ => ( ) ,
30123003 }
3013-
3014- let it = RunIteration {
3015- window_count : windows. borrow ( ) . len ( ) ,
3016- } ;
3017- it
30183004}
30193005
3020- fn on_close_requested < ' a , T : UserEvent > (
3021- callback : & ' a mut ( dyn FnMut ( RunEvent < T > ) + ' static ) ,
3006+ fn on_close_requested < T : UserEvent > (
3007+ callback : & mut ( dyn FnMut ( RunEvent < T > ) ) ,
30223008 window_id : WindowId ,
30233009 windows : Rc < RefCell < HashMap < WindowId , WindowWrapper > > > ,
30243010) {
0 commit comments