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
inspired by cppcheck
cppcheck
It could warn about code like this:
fn do_something(is_true: bool, word: String) -> String { let mut s = String::from("hello world"); if is_true { s.push_str(&word); s } else { word } }
where the scope of s can be savely reduced to span across the true branch of the if:
true
if
fn do_something(is_true: bool, word: String) -> String { if is_true { let mut s = String::from("hello world"); s.push_str(&word); s } else { word } }
The text was updated successfully, but these errors were encountered:
Either assumes or needs to assert that construction or destruction of s doesn't have side effects.
s
Sorry, something went wrong.
No branches or pull requests
inspired by
cppcheck
It could warn about code like this:
where the scope of s can be savely reduced to span across the
true
branch of theif
:The text was updated successfully, but these errors were encountered: