-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Suggestion of match_as_ref
does not compile
#4437
Comments
If you apply - Some(ref s) => Some(s),
+ Some(s) => Some(s), It will work. |
Clippy suggests to remove whole match self.source.as_ref() {
Some(s) => Some(s),
None => None,
} but rejecting |
Ah, I see it now. |
Thanks for the comments, all. I realized that this is a Rust's bug or at least weird behavior (rust-lang/rust#53716). Then it would be better to suggest using |
match_as_ref
match_as_ref
does not compile
Fix `match_as_ref` bad suggestion Fixes #4437 changelog: Fix `match_as_ref` bad suggestion
Version:
clippy 0.0.212 (e3cb40e 2019-06-25)
Playground
The text was updated successfully, but these errors were encountered: