mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Preallocate escaped CSS strings.
This commit is contained in:
parent
e8e43e5b0c
commit
886e393511
1 changed files with 1 additions and 1 deletions
|
@ -77,7 +77,7 @@ fn escape_css_ident(ident: &str) -> String {
|
|||
return ident.into()
|
||||
}
|
||||
|
||||
let mut escaped = String::new();
|
||||
let mut escaped = String::with_capacity(ident.len());
|
||||
|
||||
// A leading dash does not need to be escaped as long as it is not the
|
||||
// *only* character in the identifier.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue