Skip to content

Instantly share code, notes, and snippets.

@YanSte
Created August 18, 2022 08:36
Show Gist options
  • Save YanSte/02d738360dfd4ec7cd29453854ef10e0 to your computer and use it in GitHub Desktop.
Save YanSte/02d738360dfd4ec7cd29453854ef10e0 to your computer and use it in GitHub Desktop.
Result, a success, storing a Success value.
public extension Result where Success == Void {
/// A success, storing a Success value.
///
/// Instead of `.success(())`, now `.success`
static var success: Result {
return .success(())
}
}
// Now
return .success
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment