aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmltableelement.rs
diff options
context:
space:
mode:
authorMs2ger <ms2ger@gmail.com>2015-04-25 15:24:27 +0200
committerMs2ger <ms2ger@gmail.com>2015-04-25 15:24:27 +0200
commit41cc0a939e552f0898ab4cdeb7c4ebddb6378090 (patch)
treeaea6fdde87c438b62a10c9a4e57a40f914925a44 /components/script/dom/htmltableelement.rs
parent4108af0c113fcbd64abf2a1cf71026c2f7a653d3 (diff)
downloadservo-41cc0a939e552f0898ab4cdeb7c4ebddb6378090.tar.gz
servo-41cc0a939e552f0898ab4cdeb7c4ebddb6378090.zip
Replace the Str implementation for AttrValue by a Deref implementation.
Diffstat (limited to 'components/script/dom/htmltableelement.rs')
-rw-r--r--components/script/dom/htmltableelement.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/components/script/dom/htmltableelement.rs b/components/script/dom/htmltableelement.rs
index 437e5f6fa96..fe65327a585 100644
--- a/components/script/dom/htmltableelement.rs
+++ b/components/script/dom/htmltableelement.rs
@@ -130,18 +130,17 @@ impl<'a> VirtualMethods for JSRef<'a, HTMLTableElement> {
match attr.local_name() {
&atom!("bgcolor") => {
- self.background_color.set(str::parse_legacy_color(attr.value().as_slice()).ok())
+ self.background_color.set(str::parse_legacy_color(&attr.value()).ok())
}
&atom!("border") => {
// According to HTML5 § 14.3.9, invalid values map to 1px.
self.border.set(Some(str::parse_unsigned_integer(attr.value()
- .as_slice()
.chars()).unwrap_or(1)))
}
&atom!("cellspacing") => {
- self.cellspacing.set(str::parse_unsigned_integer(attr.value().as_slice().chars()))
+ self.cellspacing.set(str::parse_unsigned_integer(attr.value().chars()))
}
- &atom!("width") => self.width.set(str::parse_length(attr.value().as_slice())),
+ &atom!("width") => self.width.set(str::parse_length(&attr.value())),
_ => ()
}
}