File tree Expand file tree Collapse file tree 2 files changed +19
-19
lines changed
Sources/ComposableArchitecture
Tests/ComposableArchitectureTests Expand file tree Collapse file tree 2 files changed +19
-19
lines changed Original file line number Diff line number Diff 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)
Original file line number Diff line number Diff 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( ) {
You can’t perform that action at this time.
0 commit comments