@@ -175,8 +175,7 @@ impl Navigator for NavigationController {
175175 // from it would mislead the user. `OffStepOnRoute` is intentionally not
176176 // suppressed here — the user is still on the route polyline (just on a future
177177 // step), and the step-advance flow will reconcile shortly.
178- let ( visual_instruction, spoken_instruction) = if deviation. is_completely_off_route ( )
179- {
178+ let ( visual_instruction, spoken_instruction) = if deviation. is_completely_off_route ( ) {
180179 ( None , None )
181180 } else {
182181 ( visual_instruction, spoken_instruction)
@@ -397,20 +396,19 @@ impl NavigationController {
397396 // still on the route polyline, and the step-advance flow will reconcile
398397 // shortly. Apps that don't want any of this policy can configure
399398 // `RouteDeviationTracking::None`.
400- let ( visual_instruction, spoken_instruction) = if deviation
401- . is_completely_off_route ( )
402- {
403- ( None , None )
404- } else {
405- (
406- current_step
407- . get_active_visual_instruction ( progress. distance_to_next_maneuver )
408- . cloned ( ) ,
409- current_step
410- . get_current_spoken_instruction ( progress. distance_to_next_maneuver )
411- . cloned ( ) ,
412- )
413- } ;
399+ let ( visual_instruction, spoken_instruction) =
400+ if deviation. is_completely_off_route ( ) {
401+ ( None , None )
402+ } else {
403+ (
404+ current_step
405+ . get_active_visual_instruction ( progress. distance_to_next_maneuver )
406+ . cloned ( ) ,
407+ current_step
408+ . get_current_spoken_instruction ( progress. distance_to_next_maneuver )
409+ . cloned ( ) ,
410+ )
411+ } ;
414412 let annotation_json = current_step_geometry_index
415413 . and_then ( |index| current_step. get_annotation_at_current_index ( index) ) ;
416414
0 commit comments