You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Detect match statements of form str_variable.to_lowercase() with non-lowercase string literals as match arms. Should also apply to to_ascii_lowercase, to_uppercase, and to_ascii_uppercase.
Categories (optional)
Kind: clippy::correctness
The flagged match arm in the original code wouldn't ever be triggered, which is likely a bug in the program.
Uh oh!
There was an error while loading. Please reload this page.
What it does
Detect match statements of form
str_variable.to_lowercase()
with non-lowercase string literals as match arms. Should also apply toto_ascii_lowercase
,to_uppercase
, andto_ascii_uppercase
.Categories (optional)
clippy::correctness
The flagged match arm in the original code wouldn't ever be triggered, which is likely a bug in the program.
Drawbacks
None.
Example
Should be written as:
The text was updated successfully, but these errors were encountered: