Skip to content

Commit 30d331f

Browse files
committed
Cleanup: shorter and faster code
1 parent 4ae328b commit 30d331f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/rustc_lint/src/nonstandard_style.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ fn to_camel_case(s: &str) -> String {
9494
}
9595

9696
if new_word {
97-
camel_cased_component.push_str(&c.to_uppercase().to_string());
97+
camel_cased_component.extend(c.to_uppercase());
9898
} else {
99-
camel_cased_component.push_str(&c.to_lowercase().to_string());
99+
camel_cased_component.extend(c.to_lowercase());
100100
}
101101

102102
prev_is_lower_case = c.is_lowercase();

0 commit comments

Comments
 (0)