Skip to content

Commit 67ccab6

Browse files
stephencelisactions-user
authored andcommitted
Run swift-format
1 parent e73b36e commit 67ccab6

File tree

3 files changed

+19
-18
lines changed

3 files changed

+19
-18
lines changed

Sources/ComposableArchitecture/Effect.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ extension Publisher {
356356
/// - transform: A mapping function that converts `Result<Output,Failure>` to another type.
357357
/// - Returns: An effect that wraps `self`.
358358
public func catchToEffect<T>(
359-
_ transform: @escaping (Result<Output,Failure>) -> T
359+
_ transform: @escaping (Result<Output, Failure>) -> T
360360
) -> Effect<T, Never> {
361361
self
362362
.map { transform(.success($0)) }

Sources/ComposableArchitecture/SwiftUI/WithViewStore.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ public struct WithViewStore<State, Action, Content> {
6262
fileprivate var _body: Content {
6363
#if DEBUG
6464
if let prefix = self.prefix {
65-
let difference = self.previousState(self.viewStore.state)
65+
let difference =
66+
self.previousState(self.viewStore.state)
6667
.map {
6768
debugDiff($0, self.viewStore.state).map { "(Changed state)\n\($0)" }
6869
?? "(No difference in state detected)"

Tests/ComposableArchitectureTests/WithViewStoreAppTest.swift

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,26 @@ struct TestApp: App {
1313
},
1414
environment: ()
1515
)
16-
16+
1717
var body: some Scene {
1818
WithViewStore(self.store) { viewStore in
19-
#if os(iOS) || os(macOS)
20-
WindowGroup {
21-
EmptyView()
22-
}
23-
.commands {
24-
CommandMenu("Commands") {
25-
Button("Increment") {
26-
viewStore.send(())
19+
#if os(iOS) || os(macOS)
20+
WindowGroup {
21+
EmptyView()
22+
}
23+
.commands {
24+
CommandMenu("Commands") {
25+
Button("Increment") {
26+
viewStore.send(())
27+
}
28+
.keyboardShortcut("+")
2729
}
28-
.keyboardShortcut("+")
2930
}
30-
}
31-
#else
32-
WindowGroup {
33-
EmptyView()
34-
}
35-
#endif
31+
#else
32+
WindowGroup {
33+
EmptyView()
34+
}
35+
#endif
3636
}
3737
}
3838
}

0 commit comments

Comments
 (0)