Remove unnecessary deref()s (fixes #3586)

This commit is contained in:
Tim Taubert 2014-10-09 13:12:02 +02:00
parent 15b508ac10
commit 35f8270c64
30 changed files with 147 additions and 164 deletions

View file

@ -53,7 +53,7 @@ impl<'a> NodeListMethods for JSRef<'a, NodeList> {
Simple(ref elems) => elems.len() as u32,
Children(ref node) => {
let node = node.root();
node.deref().children().count() as u32
node.children().count() as u32
}
}
}
@ -64,7 +64,7 @@ impl<'a> NodeListMethods for JSRef<'a, NodeList> {
Simple(ref elems) => Some(Temporary::new(elems[index as uint].clone())),
Children(ref node) => {
let node = node.root();
node.deref().children().nth(index as uint)
node.children().nth(index as uint)
.map(|child| Temporary::from_rooted(child))
}
}