fix snake_casing of camelCased identifiers

This commit is contained in:
Erik Krogh Kristensen
2021-05-26 11:16:05 +00:00
committed by GitHub
parent aea0c6fc64
commit 9c1b237e3b

View File

@@ -357,8 +357,8 @@ fn escape_name(name: &str) -> String {
'-' => result.push_str("minus"),
'@' => result.push_str("at"),
_ if c.is_uppercase() => {
result.push_str(&c.to_lowercase().to_string());
result.push('_')
result.push('_');
result.push_str(&c.to_lowercase().to_string())
}
_ => result.push(c),
}