Skip to content

Instantly share code, notes, and snippets.

@robertmryan
Created July 21, 2024 19:30
Show Gist options
  • Save robertmryan/e089d35bec2c7f14e09d7156e114ecd0 to your computer and use it in GitHub Desktop.
Save robertmryan/e089d35bec2c7f14e09d7156e114ecd0 to your computer and use it in GitHub Desktop.
extension Task {
static func bar() {
Task<Void, Error> {
try await foo()
}
}
}
extension Task where Success == Void, Failure == Error {
static func baz() {
Task {
try await foo()
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment