aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/hir_ty/src/diagnostics/decl_check/str_helpers.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/crates/hir_ty/src/diagnostics/decl_check/str_helpers.rs b/crates/hir_ty/src/diagnostics/decl_check/str_helpers.rs
index c1ab1a675..2e1468c4c 100644
--- a/crates/hir_ty/src/diagnostics/decl_check/str_helpers.rs
+++ b/crates/hir_ty/src/diagnostics/decl_check/str_helpers.rs
@@ -12,8 +12,7 @@ enum DetectedCase {
12 12
13fn detect_case(ident: &str) -> DetectedCase { 13fn detect_case(ident: &str) -> DetectedCase {
14 let trimmed_ident = ident.trim_matches('_'); 14 let trimmed_ident = ident.trim_matches('_');
15 let first_lowercase = 15 let first_lowercase = trimmed_ident.starts_with(|chr: char| chr.is_ascii_lowercase());
16 trimmed_ident.starts_with(|chr| chr.is_ascii_lowercase());
17 let mut has_lowercase = first_lowercase; 16 let mut has_lowercase = first_lowercase;
18 let mut has_uppercase = false; 17 let mut has_uppercase = false;
19 let mut has_underscore = false; 18 let mut has_underscore = false;