aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/attr.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/attr.rs')
-rw-r--r--components/script/dom/attr.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/dom/attr.rs b/components/script/dom/attr.rs
index 3c174a993c6..cdc472d6e3f 100644
--- a/components/script/dom/attr.rs
+++ b/components/script/dom/attr.rs
@@ -250,15 +250,15 @@ impl<'a> AttrHelpers<'a> for JSRef<'a, Attr> {
/// Sets the owner element. Should be called after the attribute is added
/// or removed from its older parent.
fn set_owner(self, owner: Option<JSRef<Element>>) {
- let ns = self.namespace.clone();
+ let ref ns = self.namespace;
match (self.owner().root().r(), owner) {
(None, Some(new)) => {
// Already in the list of attributes of new owner.
- assert!(new.get_attribute(ns, &self.local_name).root().r() == Some(self))
+ assert!(new.get_attribute(&ns, &self.local_name).root().r() == Some(self))
}
(Some(old), None) => {
// Already gone from the list of attributes of old owner.
- assert!(old.get_attribute(ns, &self.local_name).is_none())
+ assert!(old.get_attribute(&ns, &self.local_name).is_none())
}
(old, new) => assert!(old == new)
}