-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle misformatted versions with a nicer error message. #53
Conversation
I'm not really a fan of how this turned out... theoretically this wants to be just using a decodable instance for |
Could you add an integration test as well as part of the |
Just waiting on travis for this now... |
Thanks! |
Handle misformatted versions with a nicer error message.
|
||
trait ToVersion { | ||
fn to_version(self) -> Option<semver::Version>; | ||
fn to_version(self) -> Result<semver::Version, String>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this pattern will become quite common in Rust code.
Handle misformatted versions with a nicer error message.
53: Add test for ambiguous `<` r=oli-obk a=killercup Inspired by https://twitter.com/b0rk/status/954366146505052160
Fixes #61.