Replace the Str implementation for AttrValue by a Deref implementation.

This commit is contained in:
Ms2ger 2015-04-25 15:24:27 +02:00
parent 4108af0c11
commit 41cc0a939e
16 changed files with 43 additions and 41 deletions

View file

@ -2254,7 +2254,7 @@ impl<'a> NodeMethods for JSRef<'a, Node> {
other_element.attrs().iter().map(|attr| attr.root()).any(|other_attr| {
(*attr.r().namespace() == *other_attr.r().namespace()) &&
(attr.r().local_name() == other_attr.r().local_name()) &&
(attr.r().value().as_slice() == other_attr.r().value().as_slice())
(**attr.r().value() == **other_attr.r().value())
})
})
}
@ -2520,7 +2520,7 @@ impl<'a> style::node::TNode<'a> for JSRef<'a, Node> {
// FIXME(https://github.com/rust-lang/rust/issues/23338)
let attr = attr.r();
let value = attr.value();
test(value.as_slice())
test(&value)
})
},
NamespaceConstraint::Any => {
@ -2530,7 +2530,7 @@ impl<'a> style::node::TNode<'a> for JSRef<'a, Node> {
// FIXME(https://github.com/rust-lang/rust/issues/23338)
let attr = attr.r();
let value = attr.value();
test(value.as_slice())
test(&value)
})
}
}