aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/css.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/css.rs')
-rw-r--r--components/script/dom/css.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/dom/css.rs b/components/script/dom/css.rs
index e1963410869..e1d2917084e 100644
--- a/components/script/dom/css.rs
+++ b/components/script/dom/css.rs
@@ -19,8 +19,8 @@ impl CSS {
if ident.bytes().any(|b| b == b'\0') {
return Err(Error::InvalidCharacter);
}
- let mut escaped = DOMString::new();
- serialize_identifier(&ident, &mut escaped.0).unwrap();
- Ok(escaped)
+ let mut escaped = String::new();
+ serialize_identifier(&ident, &mut escaped).unwrap();
+ Ok(DOMString::from(escaped))
}
}