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
Currently, normal if clauses work as intended:
unnecessary parentheses around if condition: remove these parentheses
if
if (authorization.chars().count() < 100) { /*authorization must be at least 100 characters long*/ return None; }
However, when the if clause is negated, it doesn't get recognized. I'd suggest adding a linter for negated if clauses as well.
No response
if !(authorization.starts_with("ey")) { /*authorization must start with ey*/ return None; }
Could be written as:
if !authorization.starts_with("ey") { /*authorization must start with ey*/ return None; }
The text was updated successfully, but these errors were encountered:
Note that unused_parens is a lint in rustc, not in clippy.
unused_parens
Sorry, something went wrong.
@rustbot claim
DeepakSilaych
Successfully merging a pull request may close this issue.
What it does
Currently, normal if clauses work as intended:
However, when the if clause is negated, it doesn't get recognized.
I'd suggest adding a linter for negated if clauses as well.
Advantage
Drawbacks
No response
Example
Could be written as:
The text was updated successfully, but these errors were encountered: