aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ports/geckolib/error_reporter.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/ports/geckolib/error_reporter.rs b/ports/geckolib/error_reporter.rs
index f13dc340a11..6b10077aa0f 100644
--- a/ports/geckolib/error_reporter.rs
+++ b/ports/geckolib/error_reporter.rs
@@ -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.