Skip to content

Commit

Permalink
Update Publisher+Result.swift
Browse files Browse the repository at this point in the history
  • Loading branch information
Twigz committed Sep 21, 2022
1 parent 37283fd commit f59d005
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Networking/Publisher+Result.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ extension Publisher {

/// Maps the chain of `Output`/`Failure` responses into a `Result` type that contains the `<Output/Failure>.
/// - Returns: A `Publisher` that has converted the `Output` or `Failure` into a `Result`.
func mapAsResult() -> AnyPublisher<Result<Output, Failure>, Never> {
public func mapAsResult() -> AnyPublisher<Result<Output, Failure>, Never> {
map(Result.success)
.catch { Just(.failure($0)) }
.eraseToAnyPublisher()
Expand Down

0 comments on commit f59d005

Please sign in to comment.