Skip to content

Commit

Permalink
Cleanup: shorter and faster code
Browse files Browse the repository at this point in the history
  • Loading branch information
matklad committed Nov 28, 2020
1 parent 4ae328b commit 30d331f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/rustc_lint/src/nonstandard_style.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ fn to_camel_case(s: &str) -> String {
}

if new_word {
camel_cased_component.push_str(&c.to_uppercase().to_string());
camel_cased_component.extend(c.to_uppercase());
} else {
camel_cased_component.push_str(&c.to_lowercase().to_string());
camel_cased_component.extend(c.to_lowercase());
}

prev_is_lower_case = c.is_lowercase();
Expand Down

0 comments on commit 30d331f

Please sign in to comment.