We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Check value that are matched by ref mut but only immutable methods are called.
ref mut
No response
struct S; impl S { fn f(&self) {} } fn main() { let mut x = Some(S); if let Some(ref mut y) = x { y.f(); } }
Could be written as:
struct S; impl S { fn f(&self) {} } fn main() { let mut x = Some(S); if let Some(ref y) = x { y.f(); } }
The text was updated successfully, but these errors were encountered:
@rustbot claim
Sorry, something went wrong.
unnecessary_ref_mut
not-elm
No branches or pull requests
What it does
Check value that are matched by
ref mut
but only immutable methods are called.Advantage
Drawbacks
No response
Example
Could be written as:
The text was updated successfully, but these errors were encountered: