From 68cb1f3eea43275859b7141acfd6f7cb47137096 Mon Sep 17 00:00:00 2001 From: stephencelis Date: Thu, 24 Aug 2023 15:56:56 +0000 Subject: [PATCH] Run swift-format --- Examples/LocationManager/Common/AppCore.swift | 3 +- .../Common/LocalSearchClient/Client.swift | 4 ++- .../ComposableCoreLocation/Interface.swift | 22 +++++++-------- .../Internal/Deprecations.swift | 28 +++++++++++++------ 4 files changed, 36 insertions(+), 21 deletions(-) diff --git a/Examples/LocationManager/Common/AppCore.swift b/Examples/LocationManager/Common/AppCore.swift index 17eaac2..f6d4588 100644 --- a/Examples/LocationManager/Common/AppCore.swift +++ b/Examples/LocationManager/Common/AppCore.swift @@ -75,7 +75,8 @@ public struct AppEnvironment { private struct LocationManagerId: Hashable {} private struct CancelSearchId: Hashable {} -public let appReducer = AnyReducer { state, action, environment in +public let appReducer = AnyReducer { + state, action, environment in switch action { case let .categoryButtonTapped(category): guard category != state.pointOfInterestCategory else { diff --git a/Examples/LocationManager/Common/LocalSearchClient/Client.swift b/Examples/LocationManager/Common/LocalSearchClient/Client.swift index 4ef18de..6dbe51d 100644 --- a/Examples/LocationManager/Common/LocalSearchClient/Client.swift +++ b/Examples/LocationManager/Common/LocalSearchClient/Client.swift @@ -4,7 +4,9 @@ import MapKit public struct LocalSearchClient { public var search: (MKLocalSearch.Request) -> EffectPublisher - public init(search: @escaping (MKLocalSearch.Request) -> EffectPublisher) { + public init( + search: @escaping (MKLocalSearch.Request) -> EffectPublisher + ) { self.search = search } diff --git a/Sources/ComposableCoreLocation/Interface.swift b/Sources/ComposableCoreLocation/Interface.swift index 23cc8a5..7895e27 100644 --- a/Sources/ComposableCoreLocation/Interface.swift +++ b/Sources/ComposableCoreLocation/Interface.swift @@ -318,22 +318,22 @@ public struct LocationManager { pausesLocationUpdatesAutomatically: Bool? = nil, showsBackgroundLocationIndicator: Bool? = nil ) -> EffectPublisher { -#if os(macOS) || os(tvOS) || os(watchOS) + #if os(macOS) || os(tvOS) || os(watchOS) return .none -#else + #else return self.set( Properties( - activityType: activityType, - allowsBackgroundLocationUpdates: allowsBackgroundLocationUpdates, - desiredAccuracy: desiredAccuracy, - distanceFilter: distanceFilter, - headingFilter: headingFilter, - headingOrientation: headingOrientation, - pausesLocationUpdatesAutomatically: pausesLocationUpdatesAutomatically, - showsBackgroundLocationIndicator: showsBackgroundLocationIndicator + activityType: activityType, + allowsBackgroundLocationUpdates: allowsBackgroundLocationUpdates, + desiredAccuracy: desiredAccuracy, + distanceFilter: distanceFilter, + headingFilter: headingFilter, + headingOrientation: headingOrientation, + pausesLocationUpdatesAutomatically: pausesLocationUpdatesAutomatically, + showsBackgroundLocationIndicator: showsBackgroundLocationIndicator ) ) -#endif + #endif } } diff --git a/Sources/ComposableCoreLocation/Internal/Deprecations.swift b/Sources/ComposableCoreLocation/Internal/Deprecations.swift index 1f9ec30..9bab30a 100644 --- a/Sources/ComposableCoreLocation/Internal/Deprecations.swift +++ b/Sources/ComposableCoreLocation/Internal/Deprecations.swift @@ -31,8 +31,11 @@ create: @escaping (_ id: AnyHashable) -> EffectPublisher = { _ in _unimplemented("create") }, - destroy: @escaping (AnyHashable) -> EffectPublisher = { _ in _unimplemented("destroy") }, - dismissHeadingCalibrationDisplay: @escaping (AnyHashable) -> EffectPublisher = { _ in + destroy: @escaping (AnyHashable) -> EffectPublisher = { _ in + _unimplemented("destroy") + }, + dismissHeadingCalibrationDisplay: @escaping (AnyHashable) -> EffectPublisher = { + _ in _unimplemented("dismissHeadingCalibrationDisplay") }, heading: @escaping (AnyHashable) -> Heading? = { _ in _unimplemented("heading") }, @@ -52,7 +55,8 @@ requestLocation: @escaping (AnyHashable) -> EffectPublisher = { _ in _unimplemented("requestLocation") }, - requestWhenInUseAuthorization: @escaping (AnyHashable) -> EffectPublisher = { _ in + requestWhenInUseAuthorization: @escaping (AnyHashable) -> EffectPublisher = { + _ in _unimplemented("requestWhenInUseAuthorization") }, requestTemporaryFullAccuracyAuthorization: @escaping (AnyHashable, String) -> EffectPublisher< @@ -60,16 +64,21 @@ > = { _, _ in _unimplemented("requestTemporaryFullAccuracyAuthorization") }, - set: @escaping (_ id: AnyHashable, _ properties: Properties) -> EffectPublisher = { + set: @escaping (_ id: AnyHashable, _ properties: Properties) -> EffectPublisher< + Never, Never + > = { _, _ in _unimplemented("set") }, significantLocationChangeMonitoringAvailable: @escaping () -> Bool = { _unimplemented("significantLocationChangeMonitoringAvailable") }, - startMonitoringSignificantLocationChanges: @escaping (AnyHashable) -> EffectPublisher = { + startMonitoringSignificantLocationChanges: @escaping (AnyHashable) -> EffectPublisher< + Never, Never + > = { _ in _unimplemented("startMonitoringSignificantLocationChanges") }, - startMonitoringForRegion: @escaping (AnyHashable, Region) -> EffectPublisher = { _, _ in + startMonitoringForRegion: @escaping (AnyHashable, Region) -> EffectPublisher = { + _, _ in _unimplemented("startMonitoringForRegion") }, startMonitoringVisits: @escaping (AnyHashable) -> EffectPublisher = { _ in @@ -78,10 +87,13 @@ startUpdatingLocation: @escaping (AnyHashable) -> EffectPublisher = { _ in _unimplemented("startUpdatingLocation") }, - stopMonitoringSignificantLocationChanges: @escaping (AnyHashable) -> EffectPublisher = { + stopMonitoringSignificantLocationChanges: @escaping (AnyHashable) -> EffectPublisher< + Never, Never + > = { _ in _unimplemented("stopMonitoringSignificantLocationChanges") }, - stopMonitoringForRegion: @escaping (AnyHashable, Region) -> EffectPublisher = { _, _ in + stopMonitoringForRegion: @escaping (AnyHashable, Region) -> EffectPublisher = { + _, _ in _unimplemented("stopMonitoringForRegion") }, stopMonitoringVisits: @escaping (AnyHashable) -> EffectPublisher = { _ in