We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cf96421 commit baea2c1Copy full SHA for baea2c1
css-inline/src/lib.rs
@@ -422,7 +422,8 @@ fn merge_styles(
422
let mut final_styles: Vec<String> = Vec::new();
423
for declaration in declarations {
424
let (name, value) = declaration?;
425
- let mut style = String::with_capacity(256);
+ // Allocate enough space for the new style
426
+ let mut style = String::with_capacity(name.len() + value.len() + 2);
427
style.push_str(&name);
428
style.push_str(": ");
429
replace_double_quotes!(style, name, value.trim());
0 commit comments