Created
April 4, 2020 23:29
-
-
Save jasdev/85b093150c8e9399da7edc5fe62b2d00 to your computer and use it in GitHub Desktop.
A `setFailureType` implementation.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension Publisher where Failure == Never { | |
func ourSetFailureType<NewFailure>(to failureType: NewFailure.Type) | |
-> Publishers.MapError<Self, NewFailure> { | |
mapError { _ -> NewFailure in } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment