Created
July 14, 2022 18:15
-
-
Save orchetect/5b1329e7a4d70c8f8815114157948b62 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
extension Result { | |
@_disfavoredOverload | |
public mutating func set(_ newSuccess: Success) { | |
self = .success(newSuccess) | |
} | |
@_disfavoredOverload | |
public mutating func set(_ newFailure: Failure) { | |
self = .failure(newFailure) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment