Skip to content

Commit e4a480c

Browse files
mbrandonwactions-user
authored andcommitted
Run swift-format
1 parent 803f1b4 commit e4a480c

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

Sources/ComposableArchitecture/Effect.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ extension Publisher {
361361
/// - Parameters:
362362
/// - f: A mapping function that converts `Result<Output,Failure>` to another type.
363363
/// - Returns: An effect that wraps `self`.
364-
public func catchToEffect<T>(_ f: @escaping (Result<Output,Failure>) -> T) -> Effect<T,Never> {
364+
public func catchToEffect<T>(_ f: @escaping (Result<Output, Failure>) -> T) -> Effect<T, Never> {
365365
self
366366
.catchToEffect()
367367
.map(f)

Tests/ComposableArchitectureTests/EffectTests.swift

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -26,28 +26,28 @@ final class EffectTests: XCTestCase {
2626
.store(in: &self.cancellables)
2727

2828
Future<Int, Error> { $0(.success(42)) }
29-
.catchToEffect {
30-
switch $0 {
31-
case let .success(val):
32-
return val
33-
case .failure:
34-
return -1
35-
}
29+
.catchToEffect {
30+
switch $0 {
31+
case let .success(val):
32+
return val
33+
case .failure:
34+
return -1
3635
}
37-
.sink { XCTAssertEqual($0, 42) }
38-
.store(in: &self.cancellables)
36+
}
37+
.sink { XCTAssertEqual($0, 42) }
38+
.store(in: &self.cancellables)
3939

4040
Future<Int, Error> { $0(.failure(Error())) }
41-
.catchToEffect {
42-
switch $0 {
43-
case let .success(val):
44-
return val
45-
case .failure:
46-
return -1
47-
}
41+
.catchToEffect {
42+
switch $0 {
43+
case let .success(val):
44+
return val
45+
case .failure:
46+
return -1
4847
}
49-
.sink { XCTAssertEqual($0, -1) }
50-
.store(in: &self.cancellables)
48+
}
49+
.sink { XCTAssertEqual($0, -1) }
50+
.store(in: &self.cancellables)
5151
}
5252

5353
func testConcatenate() {

0 commit comments

Comments
 (0)