Skip to content

Commit 8b98ba4

Browse files
mbrandonwgithub-actions[bot]
authored andcommitted
Run swift-format
1 parent c432a76 commit 8b98ba4

File tree

8 files changed

+17
-18
lines changed

8 files changed

+17
-18
lines changed

Examples/SpeechRecognition/SpeechRecognition/SpeechRecognition.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ struct SpeechRecognition: ReducerProtocol {
5959
}
6060

6161
case .speech(.failure(SpeechClient.Failure.couldntConfigureAudioSession)),
62-
.speech(.failure(SpeechClient.Failure.couldntStartAudioEngine)):
62+
.speech(.failure(SpeechClient.Failure.couldntStartAudioEngine)):
6363
state.alert = AlertState { TextState("Problem with audio device. Please try again.") }
6464
return .none
6565

@@ -83,10 +83,10 @@ struct SpeechRecognition: ReducerProtocol {
8383
case .denied:
8484
state.alert = AlertState {
8585
TextState(
86-
"""
87-
You denied access to speech recognition. This app needs access to transcribe your \
88-
speech.
89-
"""
86+
"""
87+
You denied access to speech recognition. This app needs access to transcribe your \
88+
speech.
89+
"""
9090
)
9191
}
9292
return .none

Sources/ComposableArchitecture/Reducer/Reducers/PresentationReducer.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,7 @@ public struct PresentationState<State> {
8787
yield &value
8888
guard success else {
8989
var description: String?
90-
if
91-
let root = root,
90+
if let root = root,
9291
let metadata = EnumMetadata(State.self),
9392
let caseName = metadata.caseName(forTag: metadata.tag(of: root))
9493
{

Sources/ComposableArchitecture/Reducer/Reducers/StackReducer.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,7 @@ public struct StackState<Element> {
7373
yield &value
7474
guard success else {
7575
var description: String?
76-
if
77-
let root = root,
76+
if let root = root,
7877
let metadata = EnumMetadata(Element.self),
7978
let caseName = metadata.caseName(forTag: metadata.tag(of: root))
8079
{

Sources/ComposableArchitecture/SwiftUI/NavigationStackStore.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public struct NavigationStackStore<State, Action, Root: View, Destination: View>
3939
return state
4040
},
4141
action: { .element(id: component.id, action: $0) }
42-
)
42+
)
4343
)
4444
}
4545
self._viewStore = StateObject(
@@ -76,7 +76,7 @@ public struct NavigationStackStore<State, Action, Root: View, Destination: View>
7676
return state
7777
},
7878
action: { .element(id: component.id, action: $0) }
79-
)
79+
)
8080
) { _ in
8181
destination(component.element)
8282
}

Sources/ComposableArchitecture/SwiftUI/PresentationModifier.swift

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,11 @@ public struct PresentationStore<
119119
let toDestinationState: (State) -> DestinationState?
120120
let toID: (PresentationState<State>) -> AnyHashable?
121121
let fromDestinationAction: (DestinationAction) -> Action
122-
let content: (
123-
Binding<AnyIdentifiable?>,
124-
DestinationContent<DestinationState, DestinationAction>
125-
) -> Content
122+
let content:
123+
(
124+
Binding<AnyIdentifiable?>,
125+
DestinationContent<DestinationState, DestinationAction>
126+
) -> Content
126127

127128
@ObservedObject var viewStore: ViewStore<PresentationState<State>, PresentationAction<Action>>
128129

Sources/ComposableArchitecture/TestStore.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -833,7 +833,7 @@ public final class TestStore<State, Action, ScopedState, ScopedAction, Environme
833833
line: UInt = #line
834834
) async {
835835
Task.cancel(id: OnFirstAppearID())
836-
836+
837837
let nanoseconds = nanoseconds ?? self.timeout
838838
let start = DispatchTime.now().uptimeNanoseconds
839839
await Task.megaYield()

Sources/swift-composable-architecture-benchmark/Dependencies.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ let dependenciesSuite = BenchmarkSuite(name: "Dependencies") { suite in
1313
.dependency(\.mainRunLoop, .immediate)
1414
.dependency(\.timeZone, .autoupdatingCurrent)
1515
.dependency(\.uuid, .init { UUID() })
16-
16+
1717
suite.benchmark("Dependency key writing") {
1818
var state = 0
1919
_ = reducer.reduce(into: &state, action: ())

Tests/ComposableArchitectureTests/EffectCancellationTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ final class EffectCancellationTests: BaseTCATestCase {
344344
}
345345
}
346346
Task {
347-
try? await Task.sleep(nanoseconds: .random(in: 1_000_000 ... 2_000_000))
347+
try? await Task.sleep(nanoseconds: .random(in: 1_000_000...2_000_000))
348348
Task.cancel(id: id)
349349
}
350350
}

0 commit comments

Comments
 (0)