Skip to content

Commit

Permalink
Rollup merge of #79505 - matklad:cleanup, r=jonas-schievink
Browse files Browse the repository at this point in the history
Cleanup: shorter and faster code
  • Loading branch information
GuillaumeGomez authored Nov 28, 2020
2 parents ffc5032 + 30d331f commit 427cdef
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 427cdef

Please sign in to comment.