diff --git a/.github/workflows/analyze.yaml b/.github/workflows/analyze.yaml index 13d9af0..4e7683c 100644 --- a/.github/workflows/analyze.yaml +++ b/.github/workflows/analyze.yaml @@ -70,7 +70,7 @@ jobs: with: path: /home/linuxbrew/.linuxbrew key: ${{ runner.os }}-linuxbrew - - name: Install swift-format 601.0.0 + - name: Install swift-format 602.0.0 if: steps.cache.outputs.cache-hit != 'true' run: | eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" diff --git a/ios/google_navigation_flutter/Sources/google_navigation_flutter/GoogleMapsAutoViewMessageHandler.swift b/ios/google_navigation_flutter/Sources/google_navigation_flutter/GoogleMapsAutoViewMessageHandler.swift index 28a1aa1..fd1499c 100644 --- a/ios/google_navigation_flutter/Sources/google_navigation_flutter/GoogleMapsAutoViewMessageHandler.swift +++ b/ios/google_navigation_flutter/Sources/google_navigation_flutter/GoogleMapsAutoViewMessageHandler.swift @@ -39,7 +39,7 @@ class GoogleMapsAutoViewMessageHandler: AutoMapViewApi { switch result { case .success: completion(.success(())) - case let .failure(error): + case .failure(let error): completion(.failure(error)) } } @@ -207,12 +207,13 @@ class GoogleMapsAutoViewMessageHandler: AutoMapViewApi { func animateCameraToLatLngBounds( bounds: LatLngBoundsDto, padding: Double, duration: Int64?, - completion: @escaping ( - Result< - Bool, - Error - > - ) + completion: + @escaping ( + Result< + Bool, + Error + > + ) -> Void ) { do { @@ -264,12 +265,13 @@ class GoogleMapsAutoViewMessageHandler: AutoMapViewApi { func animateCameraByZoom( zoomBy: Double, focusDx: Double?, focusDy: Double?, duration: Int64?, - completion: @escaping ( - Result< - Bool, - Error - > - ) -> Void + completion: + @escaping ( + Result< + Bool, + Error + > + ) -> Void ) { do { let focus = Convert.convertDeltaToPoint(dx: focusDx, dy: focusDy) diff --git a/ios/google_navigation_flutter/Sources/google_navigation_flutter/GoogleMapsNavigationSessionManager.swift b/ios/google_navigation_flutter/Sources/google_navigation_flutter/GoogleMapsNavigationSessionManager.swift index 4e5481c..2066f32 100644 --- a/ios/google_navigation_flutter/Sources/google_navigation_flutter/GoogleMapsNavigationSessionManager.swift +++ b/ios/google_navigation_flutter/Sources/google_navigation_flutter/GoogleMapsNavigationSessionManager.swift @@ -349,12 +349,13 @@ class GoogleMapsNavigationSessionManager: NSObject { func simulateLocationsAlongNewRoute( waypoints: [NavigationWaypointDto], - completion: @escaping ( - Result< - RouteStatusDto, - Error - > - ) + completion: + @escaping ( + Result< + RouteStatusDto, + Error + > + ) -> Void ) throws { /// Speedmultiplier is set to default value here because the functions using @@ -394,12 +395,13 @@ class GoogleMapsNavigationSessionManager: NSObject { func simulateLocationsAlongNewRouteWithRoutingOptions( waypoints: [NavigationWaypointDto], routingOptions: RoutingOptionsDto, - completion: @escaping ( - Result< - RouteStatusDto, - Error - > - ) -> Void + completion: + @escaping ( + Result< + RouteStatusDto, + Error + > + ) -> Void ) throws { /// Speedmultiplier is set to default value here because the functions using /// SimulationOptionsDto will set it globally to a custom value. This @@ -421,12 +423,13 @@ class GoogleMapsNavigationSessionManager: NSObject { waypoints: [NavigationWaypointDto], routingOptions: RoutingOptionsDto, simulationOptions: SimulationOptionsDto, - completion: @escaping ( - Result< - RouteStatusDto, - Error - > - ) -> Void + completion: + @escaping ( + Result< + RouteStatusDto, + Error + > + ) -> Void ) throws { try getSimulator().speedMultiplier = Float(simulationOptions.speedMultiplier) try setRoutingOptionsGlobals(routingOptions, for: .simulator) diff --git a/ios/google_navigation_flutter/Sources/google_navigation_flutter/GoogleMapsNavigationSessionMessageHandler.swift b/ios/google_navigation_flutter/Sources/google_navigation_flutter/GoogleMapsNavigationSessionMessageHandler.swift index 7c67303..4a73622 100644 --- a/ios/google_navigation_flutter/Sources/google_navigation_flutter/GoogleMapsNavigationSessionMessageHandler.swift +++ b/ios/google_navigation_flutter/Sources/google_navigation_flutter/GoogleMapsNavigationSessionMessageHandler.swift @@ -143,12 +143,13 @@ class GoogleMapsNavigationSessionMessageHandler: NavigationSessionApi { func simulateLocationsAlongNewRoute( waypoints: [NavigationWaypointDto], - completion: @escaping ( - Result< - RouteStatusDto, - Error - > - ) + completion: + @escaping ( + Result< + RouteStatusDto, + Error + > + ) -> Void ) { do { @@ -164,12 +165,13 @@ class GoogleMapsNavigationSessionMessageHandler: NavigationSessionApi { func simulateLocationsAlongNewRouteWithRoutingOptions( waypoints: [NavigationWaypointDto], routingOptions: RoutingOptionsDto, - completion: @escaping ( - Result< - RouteStatusDto, - Error - > - ) -> Void + completion: + @escaping ( + Result< + RouteStatusDto, + Error + > + ) -> Void ) { do { try GoogleMapsNavigationSessionManager.shared @@ -187,12 +189,13 @@ class GoogleMapsNavigationSessionMessageHandler: NavigationSessionApi { waypoints: [NavigationWaypointDto], routingOptions: RoutingOptionsDto, simulationOptions: SimulationOptionsDto, - completion: @escaping ( - Result< - RouteStatusDto, - Error - > - ) -> Void + completion: + @escaping ( + Result< + RouteStatusDto, + Error + > + ) -> Void ) { do { try GoogleMapsNavigationSessionManager.shared diff --git a/ios/google_navigation_flutter/Sources/google_navigation_flutter/GoogleMapsNavigationViewMessageHandler.swift b/ios/google_navigation_flutter/Sources/google_navigation_flutter/GoogleMapsNavigationViewMessageHandler.swift index eb87b9e..c0acc66 100644 --- a/ios/google_navigation_flutter/Sources/google_navigation_flutter/GoogleMapsNavigationViewMessageHandler.swift +++ b/ios/google_navigation_flutter/Sources/google_navigation_flutter/GoogleMapsNavigationViewMessageHandler.swift @@ -40,7 +40,7 @@ class GoogleMapsNavigationViewMessageHandler: MapViewApi { switch result { case .success: completion(.success(())) - case let .failure(error): + case .failure(let error): completion(.failure(error)) } } @@ -208,12 +208,13 @@ class GoogleMapsNavigationViewMessageHandler: MapViewApi { func animateCameraToLatLngBounds( viewId: Int64, bounds: LatLngBoundsDto, padding: Double, duration: Int64?, - completion: @escaping ( - Result< - Bool, - Error - > - ) -> Void + completion: + @escaping ( + Result< + Bool, + Error + > + ) -> Void ) { do { try getView(viewId).animateCameraToLatLngBounds( @@ -264,12 +265,13 @@ class GoogleMapsNavigationViewMessageHandler: MapViewApi { func animateCameraByZoom( viewId: Int64, zoomBy: Double, focusDx: Double?, focusDy: Double?, duration: Int64?, - completion: @escaping ( - Result< - Bool, - Error - > - ) -> Void + completion: + @escaping ( + Result< + Bool, + Error + > + ) -> Void ) { do { let focus = Convert.convertDeltaToPoint(dx: focusDx, dy: focusDy)