lint: explain the non-obvious need for a negative test
This commit is contained in:
parent
c64feb6341
commit
298a6e6657
@ -923,6 +923,8 @@ impl NonSnakeCase {
|
||||
allow_underscore = match c {
|
||||
'_' if !allow_underscore => return false,
|
||||
'_' => false,
|
||||
// It would be more obvious to use `c.is_lowercase()`,
|
||||
// but some characters do not have a lowercase form
|
||||
c if !c.is_uppercase() => true,
|
||||
_ => return false,
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user