Skip to content

Commit 4e6492b

Browse files
committed
fix compiling
1 parent ea294dc commit 4e6492b

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/properties/font.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -423,11 +423,12 @@ impl<'i> ToCss for FamilyName<'i> {
423423
if !val.is_empty() && !GenericFontFamily::parse_string(val).is_ok() {
424424
// Family names with two or more consecutive spaces must be quoted to preserve the spaces.
425425
let needs_quotes = val.contains(" ");
426-
let mut id = if needs_quotes {
427-
return serialize_string(&val, dest)
428-
} else {
429-
String::new()
430-
};
426+
if needs_quotes {
427+
serialize_string(&val, dest)?;
428+
return Ok(());
429+
}
430+
431+
let mut id = String::new();
431432
let mut first = true;
432433
for slice in val.split(' ') {
433434
if first {

0 commit comments

Comments
 (0)