Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/diagnostics/decl_check/case_conv.rs')
| -rw-r--r-- | crates/hir-ty/src/diagnostics/decl_check/case_conv.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/hir-ty/src/diagnostics/decl_check/case_conv.rs b/crates/hir-ty/src/diagnostics/decl_check/case_conv.rs index aa0c9e30be..348f8a0f4a 100644 --- a/crates/hir-ty/src/diagnostics/decl_check/case_conv.rs +++ b/crates/hir-ty/src/diagnostics/decl_check/case_conv.rs @@ -49,7 +49,7 @@ fn is_camel_case(name: &str) -> bool { let mut fst = None; // start with a non-lowercase letter rather than non-uppercase // ones (some scripts don't have a concept of upper/lowercase) - name.chars().next().map_or(true, |c| !c.is_lowercase()) + name.chars().next().is_none_or(|c| !c.is_lowercase()) && !name.contains("__") && !name.chars().any(|snd| { let ret = match fst { |