-
Notifications
You must be signed in to change notification settings - Fork 127
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
Fix bugs #56
Fix bugs #56
Conversation
src/de/tests.rs
Outdated
let de: Result<(i32, String)> = from_str("(4, \"Hello)"); | ||
|
||
assert!({ | ||
if let Err(Error::Parser(ParseError::ExpectedStringEnd, _)) = de { |
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.
match ftw!
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.
How does match help here?
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.
(He might be referencing the concept of pattern matching?)
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 just don't see the point in if let
sugar over match
if you take both arms and occupy more lines in the end
Ping @kvark It'd be really nice to get this bug fix released as a patch version. |
@Xaeroxe that's my fault, didn't address the review earlier. |
bors r+ |
Build succeeded |
Turns out I actually used this pattern 3 times..