Skip to content

Conversation

mattrubin
Copy link
Contributor

Swift 5 added a Result enum to the standard library that can be used in place of antitypical/Result.

The only change to the Result type's API, as used but SwiftGit2, is that the new type doesn't have the optional-returning value and error accessors. In the tests, I've added shims to re-implement those properties until Nimble adds matchers for the new Result. In the library itself, I've refactored the code that used those properties to use switch statements instead. This new approach produces code with fewer force-unwraps, and also revealed places where failure handling was previously implemented incorrectly.

@mdiep mdiep merged commit 3adf7e4 into SwiftGit2:master Apr 15, 2019
@mattrubin mattrubin deleted the result branch April 26, 2019 23:59
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.

2 participants