@@ -142,14 +142,14 @@ impl<State: 'static, H: History + Default> EguiRouter<State, H> {
142142 if self . history . len ( ) >= 2 {
143143 let idx = self . history . len ( ) - 2 ;
144144 if let Ok ( route) = & mut self . history [ idx] . route {
145- route. on_hiding ( state ) ;
145+ route. on_hiding ( ) ;
146146 }
147147 }
148148
149149 // Fire on_showing on the newly created route
150150 if let Some ( last) = self . history . last_mut ( ) {
151151 if let Ok ( route) = & mut last. route {
152- route. on_showing ( state ) ;
152+ route. on_showing ( ) ;
153153 }
154154 }
155155
@@ -198,21 +198,21 @@ impl<State: 'static, H: History + Default> EguiRouter<State, H> {
198198 self . navigate_transition ( state, route, self . forward_transition . clone ( ) )
199199 }
200200
201- fn back_impl ( & mut self , state : & mut State , transition_config : TransitionConfig ) {
201+ fn back_impl ( & mut self , transition_config : TransitionConfig ) {
202202 if self . history . len ( ) > 1 {
203203 let mut leaving_route = self . history . pop ( ) ;
204204
205205 // Fire on_hiding on the leaving route
206206 if let Some ( ref mut leaving) = leaving_route {
207207 if let Ok ( route) = & mut leaving. route {
208- route. on_hiding ( state ) ;
208+ route. on_hiding ( ) ;
209209 }
210210 }
211211
212212 // Fire on_showing on the route that is now being revealed
213213 if let Some ( last) = self . history . last_mut ( ) {
214214 if let Ok ( route) = & mut last. route {
215- route. on_showing ( state ) ;
215+ route. on_showing ( ) ;
216216 }
217217 }
218218
@@ -225,19 +225,15 @@ impl<State: 'static, H: History + Default> EguiRouter<State, H> {
225225 }
226226
227227 /// Go back with a custom transition
228- pub fn back_transition (
229- & mut self ,
230- state : & mut State ,
231- transition_config : TransitionConfig ,
232- ) -> RouterResult {
228+ pub fn back_transition ( & mut self , transition_config : TransitionConfig ) -> RouterResult {
233229 self . history_kind . back ( ) ?;
234- self . back_impl ( state , transition_config) ;
230+ self . back_impl ( transition_config) ;
235231 Ok ( ( ) )
236232 }
237233
238234 /// Go back with the default transition
239- pub fn back ( & mut self , state : & mut State ) -> RouterResult {
240- self . back_transition ( state , self . backward_transition . clone ( ) )
235+ pub fn back ( & mut self ) -> RouterResult {
236+ self . back_transition ( self . backward_transition . clone ( ) )
241237 }
242238
243239 /// Replace the current route with a custom transition
@@ -266,7 +262,7 @@ impl<State: 'static, H: History + Default> EguiRouter<State, H> {
266262 // Fire on_hiding on the leaving route
267263 if let Some ( ref mut leaving) = leaving_route {
268264 if let Ok ( route) = & mut leaving. route {
269- route. on_hiding ( state ) ;
265+ route. on_hiding ( ) ;
270266 }
271267 }
272268
@@ -285,7 +281,7 @@ impl<State: 'static, H: History + Default> EguiRouter<State, H> {
285281 // Fire on_showing on the newly created route
286282 if let Some ( last) = self . history . last_mut ( ) {
287283 if let Ok ( route) = & mut last. route {
288- route. on_showing ( state ) ;
284+ route. on_showing ( ) ;
289285 }
290286 }
291287
@@ -349,7 +345,7 @@ impl<State: 'static, H: History + Default> EguiRouter<State, H> {
349345 . retain ( |r| r. state <= route_state || r. state == active_state) ;
350346
351347 if route_state < active_state {
352- self . back_impl ( state , self . backward_transition . clone ( ) ) ;
348+ self . back_impl ( self . backward_transition . clone ( ) ) ;
353349 }
354350 } else {
355351 self . navigate_impl ( state, & path, self . forward_transition . clone ( ) , state_index)
@@ -402,33 +398,33 @@ impl<State: 'static, H: History + Default> EguiRouter<State, H> {
402398 // Leaving route is fully hidden
403399 if let Some ( ref mut leaving) = transition. leaving_route {
404400 if let Ok ( route) = & mut leaving. route {
405- route. on_hide ( state ) ;
401+ route. on_hide ( ) ;
406402 }
407403 }
408404 // Current top is fully shown again
409405 if let Some ( last) = self . history . last_mut ( ) {
410406 if let Ok ( route) = & mut last. route {
411- route. on_shown ( state ) ;
407+ route. on_shown ( ) ;
412408 }
413409 }
414410 } else {
415411 // Forward/replace completed
416412 if let Some ( ref mut leaving) = transition. leaving_route {
417413 // Replace: leaving route is fully hidden
418414 if let Ok ( route) = & mut leaving. route {
419- route. on_hide ( state ) ;
415+ route. on_hide ( ) ;
420416 }
421417 } else if self . history . len ( ) >= 2 {
422418 // Forward: previous top is now fully hidden
423419 let idx = self . history . len ( ) - 2 ;
424420 if let Ok ( route) = & mut self . history [ idx] . route {
425- route. on_hide ( state ) ;
421+ route. on_hide ( ) ;
426422 }
427423 }
428424 // The new top route is now fully shown
429425 if let Some ( last) = self . history . last_mut ( ) {
430426 if let Ok ( route) = & mut last. route {
431- route. on_shown ( state ) ;
427+ route. on_shown ( ) ;
432428 }
433429 }
434430 }
@@ -561,14 +557,14 @@ impl<State: 'static, H: History + Default> EguiRouter<State, H> {
561557 // Fire on_hiding on the popped route
562558 if let Some ( ref mut leaving) = popped {
563559 if let Ok ( route) = & mut leaving. route {
564- route. on_hiding ( state ) ;
560+ route. on_hiding ( ) ;
565561 }
566562 }
567563
568564 // Fire on_showing on the route being revealed
569565 if let Some ( last) = self . history . last_mut ( ) {
570566 if let Ok ( route) = & mut last. route {
571- route. on_showing ( state ) ;
567+ route. on_showing ( ) ;
572568 }
573569 }
574570
0 commit comments