Skip to content

Commit bcae29f

Browse files
stephencelisgithub-actions[bot]
authored andcommitted
Run swift-format
1 parent b520d95 commit bcae29f

File tree

27 files changed

+190
-151
lines changed

27 files changed

+190
-151
lines changed

Examples/CaseStudies/SwiftUICaseStudies/03-Navigation-NavigateAndLoad.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ struct NavigateAndLoad: ReducerProtocol {
1515
var isNavigationActive = false
1616
var optionalCounter: Counter.State?
1717
}
18-
18+
1919
enum Action: Equatable {
2020
case optionalCounter(Counter.Action)
2121
case setNavigation(isActive: Bool)
2222
case setNavigationIsActiveDelayCompleted
2323
}
24-
24+
2525
@Dependency(\.mainQueue) var mainQueue
2626
private enum CancelID {}
2727

Examples/CaseStudies/SwiftUICaseStudies/04-HigherOrderReducers-Recursion.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ extension Nested.State {
9999
id: UUID(),
100100
name: "Bar",
101101
rows: [
102-
Nested.State(id: UUID(), name: "", rows: []),
102+
Nested.State(id: UUID(), name: "", rows: [])
103103
]
104104
),
105105
Nested.State(

Examples/CaseStudies/SwiftUICaseStudiesTests/02-Effects-RefreshableTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ final class RefreshableTests: XCTestCase {
5555
await store.send(.incrementButtonTapped) {
5656
$0.count = 1
5757
}
58-
await store.send(.refresh)
58+
await store.send(.refresh)
5959
await store.send(.cancelButtonTapped)
6060
}
6161
}

Examples/CaseStudies/tvOSCaseStudiesTests/FocusTests.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import ComposableArchitecture
22
import XCTest
3+
34
@testable import tvOSCaseStudies
45

56
@MainActor

Examples/SpeechRecognition/SpeechRecognition/SpeechClient/Client.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ extension SpeechClient: TestDependencyKey {
6666
}
6767
)
6868
}()
69-
69+
7070
static let testValue = Self(
7171
finishTask: XCTUnimplemented("\(Self.self).finishTask"),
7272
requestAuthorization: XCTUnimplemented(

Examples/VoiceMemos/VoiceMemos/AudioPlayerClient/AudioPlayerClient.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ extension AudioPlayerClient: TestDependencyKey {
1616

1717
static let testValue = Self(
1818
play: XCTUnimplemented("\(Self.self).play")
19-
)
19+
)
2020
}
2121

2222
extension DependencyValues {

Examples/VoiceMemos/VoiceMemos/AudioRecorderClient/AudioRecorderClient.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ extension AudioRecorderClient: TestDependencyKey {
3232
}
3333
)
3434
}()
35-
35+
3636
static let testValue = Self(
3737
currentTime: XCTUnimplemented("\(Self.self).currentTime", placeholder: nil),
3838
requestRecordPermission: XCTUnimplemented(

Examples/VoiceMemos/VoiceMemos/VoiceMemos.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ struct VoiceMemos: ReducerProtocol {
99
var audioRecorderPermission = RecorderPermission.undetermined
1010
var recordingMemo: RecordingMemo.State?
1111
var voiceMemos: IdentifiedArrayOf<VoiceMemo.State> = []
12-
12+
1313
enum RecorderPermission {
1414
case allowed
1515
case denied
1616
case undetermined
1717
}
1818
}
19-
19+
2020
enum Action: Equatable {
2121
case alertDismissed
2222
case openSettingsButtonTapped
@@ -209,7 +209,6 @@ struct RecordButton: View {
209209
}
210210
}
211211

212-
213212
struct VoiceMemos_Previews: PreviewProvider {
214213
static var previews: some View {
215214
VoiceMemosView(

Examples/VoiceMemos/VoiceMemosTests/VoiceMemosTests.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,7 @@ final class VoiceMemosTests: XCTestCase {
6161
await store.receive(.recordingMemo(.audioRecorderDidFinish(.success(true))))
6262
try await store.receive(
6363
.recordingMemo(.delegate(.didFinish(.success(XCTUnwrap(store.state.recordingMemo)))))
64-
)
65-
{
64+
) {
6665
$0.recordingMemo = nil
6766
$0.voiceMemos = [
6867
VoiceMemo.State(

Sources/ComposableArchitecture/Effects/Publisher.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,8 @@ extension Publisher {
457457
transform(action)
458458
}
459459
}
460-
return self
460+
return
461+
self
461462
.map { transform(.success($0)) }
462463
.catch { Just(transform(.failure($0))) }
463464
.eraseToEffect()

Sources/ComposableArchitecture/Internal/OpenExistential.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
(lhs as? any Equatable)?.isEqual(other: rhs)
77
}
88

9-
private extension Equatable {
10-
func isEqual(other: Any) -> Bool {
9+
extension Equatable {
10+
fileprivate func isEqual(other: Any) -> Bool {
1111
self == other as? Self
1212
}
1313
}

Sources/ComposableArchitecture/Reducer/AnyReducer/AnyReducerDebug.swift

Lines changed: 40 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -19,28 +19,32 @@ extension AnyReducer {
1919
@available(
2020
iOS,
2121
deprecated: 9999.0,
22-
message: """
22+
message:
23+
"""
2324
This API has been soft-deprecated in favor of 'ReducerProtocol.debug'. Read the migration guide for more information: https://pointfreeco.github.io/swift-composable-architecture/main/documentation/composablearchitecture/reducerprotocol
2425
"""
2526
)
2627
@available(
2728
macOS,
2829
deprecated: 9999.0,
29-
message: """
30+
message:
31+
"""
3032
This API has been soft-deprecated in favor of 'ReducerProtocol.debug'. Read the migration guide for more information: https://pointfreeco.github.io/swift-composable-architecture/main/documentation/composablearchitecture/reducerprotocol
3133
"""
3234
)
3335
@available(
3436
tvOS,
3537
deprecated: 9999.0,
36-
message: """
38+
message:
39+
"""
3740
This API has been soft-deprecated in favor of 'ReducerProtocol.debug'. Read the migration guide for more information: https://pointfreeco.github.io/swift-composable-architecture/main/documentation/composablearchitecture/reducerprotocol
3841
"""
3942
)
4043
@available(
4144
watchOS,
4245
deprecated: 9999.0,
43-
message: """
46+
message:
47+
"""
4448
This API has been soft-deprecated in favor of 'ReducerProtocol.debug'. Read the migration guide for more information: https://pointfreeco.github.io/swift-composable-architecture/main/documentation/composablearchitecture/reducerprotocol
4549
"""
4650
)
@@ -77,28 +81,32 @@ extension AnyReducer {
7781
@available(
7882
iOS,
7983
deprecated: 9999.0,
80-
message: """
84+
message:
85+
"""
8186
This API has been soft-deprecated in favor of 'ReducerProtocol.debug'. Read the migration guide for more information: https://pointfreeco.github.io/swift-composable-architecture/main/documentation/composablearchitecture/reducerprotocol
8287
"""
8388
)
8489
@available(
8590
macOS,
8691
deprecated: 9999.0,
87-
message: """
92+
message:
93+
"""
8894
This API has been soft-deprecated in favor of 'ReducerProtocol.debug'. Read the migration guide for more information: https://pointfreeco.github.io/swift-composable-architecture/main/documentation/composablearchitecture/reducerprotocol
8995
"""
9096
)
9197
@available(
9298
tvOS,
9399
deprecated: 9999.0,
94-
message: """
100+
message:
101+
"""
95102
This API has been soft-deprecated in favor of 'ReducerProtocol.debug'. Read the migration guide for more information: https://pointfreeco.github.io/swift-composable-architecture/main/documentation/composablearchitecture/reducerprotocol
96103
"""
97104
)
98105
@available(
99106
watchOS,
100107
deprecated: 9999.0,
101-
message: """
108+
message:
109+
"""
102110
This API has been soft-deprecated in favor of 'ReducerProtocol.debug'. Read the migration guide for more information: https://pointfreeco.github.io/swift-composable-architecture/main/documentation/composablearchitecture/reducerprotocol
103111
"""
104112
)
@@ -137,28 +145,32 @@ extension AnyReducer {
137145
@available(
138146
iOS,
139147
deprecated: 9999.0,
140-
message: """
148+
message:
149+
"""
141150
This API has been soft-deprecated in favor of 'ReducerProtocol.debug'. Read the migration guide for more information: https://pointfreeco.github.io/swift-composable-architecture/main/documentation/composablearchitecture/reducerprotocol
142151
"""
143152
)
144153
@available(
145154
macOS,
146155
deprecated: 9999.0,
147-
message: """
156+
message:
157+
"""
148158
This API has been soft-deprecated in favor of 'ReducerProtocol.debug'. Read the migration guide for more information: https://pointfreeco.github.io/swift-composable-architecture/main/documentation/composablearchitecture/reducerprotocol
149159
"""
150160
)
151161
@available(
152162
tvOS,
153163
deprecated: 9999.0,
154-
message: """
164+
message:
165+
"""
155166
This API has been soft-deprecated in favor of 'ReducerProtocol.debug'. Read the migration guide for more information: https://pointfreeco.github.io/swift-composable-architecture/main/documentation/composablearchitecture/reducerprotocol
156167
"""
157168
)
158169
@available(
159170
watchOS,
160171
deprecated: 9999.0,
161-
message: """
172+
message:
173+
"""
162174
This API has been soft-deprecated in favor of 'ReducerProtocol.debug'. Read the migration guide for more information: https://pointfreeco.github.io/swift-composable-architecture/main/documentation/composablearchitecture/reducerprotocol
163175
"""
164176
)
@@ -222,28 +234,32 @@ extension AnyReducer {
222234
@available(
223235
iOS,
224236
deprecated: 9999.0,
225-
message: """
237+
message:
238+
"""
226239
This API that used this type has been soft-deprecated in favor of 'ReducerProtocol.debug'. Read the migration guide for more information: https://pointfreeco.github.io/swift-composable-architecture/main/documentation/composablearchitecture/reducerprotocol
227240
"""
228241
)
229242
@available(
230243
macOS,
231244
deprecated: 9999.0,
232-
message: """
245+
message:
246+
"""
233247
This API that used this type has been soft-deprecated in favor of 'ReducerProtocol.debug'. Read the migration guide for more information: https://pointfreeco.github.io/swift-composable-architecture/main/documentation/composablearchitecture/reducerprotocol
234248
"""
235249
)
236250
@available(
237251
tvOS,
238252
deprecated: 9999.0,
239-
message: """
253+
message:
254+
"""
240255
This API that used this type has been soft-deprecated in favor of 'ReducerProtocol.debug'. Read the migration guide for more information: https://pointfreeco.github.io/swift-composable-architecture/main/documentation/composablearchitecture/reducerprotocol
241256
"""
242257
)
243258
@available(
244259
watchOS,
245260
deprecated: 9999.0,
246-
message: """
261+
message:
262+
"""
247263
This API that used this type has been soft-deprecated in favor of 'ReducerProtocol.debug'. Read the migration guide for more information: https://pointfreeco.github.io/swift-composable-architecture/main/documentation/composablearchitecture/reducerprotocol
248264
"""
249265
)
@@ -279,28 +295,32 @@ public enum ActionFormat: Sendable {
279295
@available(
280296
iOS,
281297
deprecated: 9999.0,
282-
message: """
298+
message:
299+
"""
283300
This API that used this type has been soft-deprecated in favor of 'ReducerProtocol.debug'. Read the migration guide for more information: https://pointfreeco.github.io/swift-composable-architecture/main/documentation/composablearchitecture/reducerprotocol
284301
"""
285302
)
286303
@available(
287304
macOS,
288305
deprecated: 9999.0,
289-
message: """
306+
message:
307+
"""
290308
This API that used this type has been soft-deprecated in favor of 'ReducerProtocol.debug'. Read the migration guide for more information: https://pointfreeco.github.io/swift-composable-architecture/main/documentation/composablearchitecture/reducerprotocol
291309
"""
292310
)
293311
@available(
294312
tvOS,
295313
deprecated: 9999.0,
296-
message: """
314+
message:
315+
"""
297316
This API that used this type has been soft-deprecated in favor of 'ReducerProtocol.debug'. Read the migration guide for more information: https://pointfreeco.github.io/swift-composable-architecture/main/documentation/composablearchitecture/reducerprotocol
298317
"""
299318
)
300319
@available(
301320
watchOS,
302321
deprecated: 9999.0,
303-
message: """
322+
message:
323+
"""
304324
This API that used this type has been soft-deprecated in favor of 'ReducerProtocol.debug'. Read the migration guide for more information: https://pointfreeco.github.io/swift-composable-architecture/main/documentation/composablearchitecture/reducerprotocol
305325
"""
306326
)

Sources/ComposableArchitecture/Reducer/AnyReducer/AnyReducerSignpost.swift

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,28 +24,32 @@ extension AnyReducer {
2424
@available(
2525
iOS,
2626
deprecated: 9999.0,
27-
message: """
27+
message:
28+
"""
2829
This API has been soft-deprecated in favor of 'ReducerProtocol.signpost'. Read the migration guide for more information: https://pointfreeco.github.io/swift-composable-architecture/main/documentation/composablearchitecture/reducerprotocol
2930
"""
3031
)
3132
@available(
3233
macOS,
3334
deprecated: 9999.0,
34-
message: """
35+
message:
36+
"""
3537
This API has been soft-deprecated in favor of 'ReducerProtocol.signpost'. Read the migration guide for more information: https://pointfreeco.github.io/swift-composable-architecture/main/documentation/composablearchitecture/reducerprotocol
3638
"""
3739
)
3840
@available(
3941
tvOS,
4042
deprecated: 9999.0,
41-
message: """
43+
message:
44+
"""
4245
This API has been soft-deprecated in favor of 'ReducerProtocol.signpost'. Read the migration guide for more information: https://pointfreeco.github.io/swift-composable-architecture/main/documentation/composablearchitecture/reducerprotocol
4346
"""
4447
)
4548
@available(
4649
watchOS,
4750
deprecated: 9999.0,
48-
message: """
51+
message:
52+
"""
4953
This API has been soft-deprecated in favor of 'ReducerProtocol.signpost'. Read the migration guide for more information: https://pointfreeco.github.io/swift-composable-architecture/main/documentation/composablearchitecture/reducerprotocol
5054
"""
5155
)

Sources/ComposableArchitecture/Reducer/Reducers/DependencyKeyWritingReducer.swift

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,10 @@ extension ReducerProtocol {
7070
_ keyPath: WritableKeyPath<DependencyValues, Value>,
7171
_ value: Value
7272
)
73-
// NB: We should not return `some ReducerProtocol<State, Action>` here. That would prevent the
74-
// specialization defined below from being called, which fuses chained calls.
75-
-> _DependencyKeyWritingReducer<Self> {
73+
// NB: We should not return `some ReducerProtocol<State, Action>` here. That would prevent the
74+
// specialization defined below from being called, which fuses chained calls.
75+
-> _DependencyKeyWritingReducer<Self>
76+
{
7677
_DependencyKeyWritingReducer(base: self) { $0[keyPath: keyPath] = value }
7778
}
7879

@@ -106,9 +107,10 @@ extension ReducerProtocol {
106107
_ keyPath: WritableKeyPath<DependencyValues, V>,
107108
transform: @escaping (inout V) -> Void
108109
)
109-
// NB: We should not return `some ReducerProtocol<State, Action>` here. That would prevent the
110-
// specialization defined below from being called, which fuses chained calls.
111-
-> _DependencyKeyWritingReducer<Self> {
110+
// NB: We should not return `some ReducerProtocol<State, Action>` here. That would prevent the
111+
// specialization defined below from being called, which fuses chained calls.
112+
-> _DependencyKeyWritingReducer<Self>
113+
{
112114
_DependencyKeyWritingReducer(base: self) { transform(&$0[keyPath: keyPath]) }
113115
}
114116
}

Sources/ComposableArchitecture/Reducer/Reducers/IfLetReducer.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public struct _IfLetReducer<Parent: ReducerProtocol, Child: ReducerProtocol>: Re
109109
into state: inout Parent.State, action: Parent.Action
110110
) -> Effect<Parent.Action, Never> {
111111
self.reduceChild(into: &state, action: action)
112-
.merge(with: self.parent.reduce(into: &state, action: action))
112+
.merge(with: self.parent.reduce(into: &state, action: action))
113113
}
114114

115115
@inlinable

Sources/ComposableArchitecture/ReducerProtocol.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@
159159
/// }
160160
/// ```
161161
///
162-
public protocol ReducerProtocol<State, Action> {
162+
public protocol ReducerProtocol<State,Action> {
163163
/// A type that holds the current state of the reducer.
164164
associatedtype State
165165

0 commit comments

Comments
 (0)