Created
August 18, 2022 08:36
-
-
Save YanSte/02d738360dfd4ec7cd29453854ef10e0 to your computer and use it in GitHub Desktop.
Result, a success, storing a Success value.
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
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