Cleanup: shorter and faster code
This commit is contained in:
parent
4ae328bef4
commit
30d331ffb6
1 changed files with 2 additions and 2 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue