File tree Expand file tree Collapse file tree 3 files changed +4
-18
lines changed
Yosemite/YosemiteTests/Mocks/Networking/Remote Expand file tree Collapse file tree 3 files changed +4
-18
lines changed Original file line number Diff line number Diff line change @@ -104,12 +104,7 @@ extension MockAccountRemote: AccountRemoteProtocol {
104104 throw NetworkError . notFound
105105 }
106106
107- switch result {
108- case let . success( suggestions) :
109- return suggestions
110- case let . failure( error) :
111- throw error
112- }
107+ return try result. get ( )
113108 }
114109
115110 func createAccount( email: String ,
Original file line number Diff line number Diff line change @@ -19,11 +19,7 @@ extension MockDomainRemote: DomainRemoteProtocol {
1919 XCTFail ( " Could not find result for loading domain suggestions. " )
2020 throw NetworkError . notFound
2121 }
22- switch result {
23- case let . success( suggestions) :
24- return suggestions
25- case let . failure( error) :
26- throw error
27- }
22+
23+ return try result. get ( )
2824 }
2925}
Original file line number Diff line number Diff line change @@ -20,11 +20,6 @@ extension MockSiteRemote: SiteRemoteProtocol {
2020 throw NetworkError . notFound
2121 }
2222
23- switch result {
24- case let . success( response) :
25- return response
26- case let . failure( error) :
27- throw error
28- }
23+ return try result. get ( )
2924 }
3025}
You can’t perform that action at this time.
0 commit comments