Merge pull request #87 from haaawk/remove_allocation

Remove unneded allocation
This commit is contained in:
Pekka Enberg
2024-07-07 13:59:37 +03:00
committed by GitHub

View File

@@ -1,7 +1,6 @@
pub fn normalize_ident(ident: &str) -> String {
pub fn normalize_ident(mut ident: &str) -> String {
if ident.starts_with('"') && ident.ends_with('"') {
ident[1..ident.len() - 1].to_string().to_lowercase()
} else {
ident.to_lowercase()
ident = &ident[1..ident.len() - 1];
}
ident.to_lowercase()
}