Skip to content

Commit 6eb5245

Browse files
authored
Rollup merge of #79505 - matklad:cleanup, r=jonas-schievink
Cleanup: shorter and faster code
2 parents c9c81d9 + 30d331f commit 6eb5245

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/rustc_lint/src/nonstandard_style.rs

+2-2
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)