Skip to content

Introduce mapFailure function#338

Closed
clive819 wants to merge 9 commits intoapple:mainfrom
clive819:mapFailure
Closed

Introduce mapFailure function#338
clive819 wants to merge 9 commits intoapple:mainfrom
clive819:mapFailure

Conversation

@clive819
Copy link
Copy Markdown
Contributor

@clive819 clive819 commented Nov 2, 2024

Post: https://forums.swift.org/t/pitch-map-error/75422

Pretty much the same as Combine.Publisher.mapError but for AsyncSequence.

This enables you to do something like this:

let sequence = myAsyncSequence.mapFailure { MyGenericError(wrappedError: $0) }

Related PR: #324
Pick the one you like :)

@clive819 clive819 marked this pull request as ready for review November 2, 2024 02:10
@clive819 clive819 closed this Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant