diff options
Diffstat (limited to 'components/script/dom/attr.rs')
-rw-r--r-- | components/script/dom/attr.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/components/script/dom/attr.rs b/components/script/dom/attr.rs index 789e5f925d6..e8a66199db7 100644 --- a/components/script/dom/attr.rs +++ b/components/script/dom/attr.rs @@ -29,7 +29,7 @@ pub enum AttrSettingType { ReplacedAttr, } -#[deriving(PartialEq, Clone)] +#[derive(PartialEq, Clone)] #[jstraceable] pub enum AttrValue { String(DOMString), @@ -58,7 +58,8 @@ impl AttrValue { } pub fn from_u32(string: DOMString, default: u32) -> AttrValue { - let result: u32 = from_str(string.as_slice()).unwrap_or(default); + // XXX Is parse() correct? + let result: u32 = string.parse().unwrap_or(default); AttrValue::UInt(string, result) } |