aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/node.rs
diff options
context:
space:
mode:
authorMs2ger <ms2ger@gmail.com>2015-01-22 14:49:14 +0100
committerMs2ger <ms2ger@gmail.com>2015-01-22 16:04:21 +0100
commit13c7cf928a5817de315a58a4fa15dc9b7fdc3d7f (patch)
tree2e9a313045a402d7445fe91da3390193ee7c6d6c /components/script/dom/node.rs
parentee4c56bd8ba333ee8e4b21e0678d406a67a79b66 (diff)
downloadservo-13c7cf928a5817de315a58a4fa15dc9b7fdc3d7f.tar.gz
servo-13c7cf928a5817de315a58a4fa15dc9b7fdc3d7f.zip
Stop calling deref() and deref_mut() explicitly.
Diffstat (limited to 'components/script/dom/node.rs')
-rw-r--r--components/script/dom/node.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs
index d23c14a586f..2d86c48c2d6 100644
--- a/components/script/dom/node.rs
+++ b/components/script/dom/node.rs
@@ -515,7 +515,7 @@ impl<'a> NodeHelpers<'a> for JSRef<'a, Node> {
}
fn is_in_doc(self) -> bool {
- self.deref().flags.get().contains(IS_IN_DOC)
+ self.flags.get().contains(IS_IN_DOC)
}
/// Returns the type ID of this node. Fails if this node is borrowed mutably.
@@ -728,7 +728,7 @@ impl<'a> NodeHelpers<'a> for JSRef<'a, Node> {
}
fn to_trusted_node_address(self) -> TrustedNodeAddress {
- TrustedNodeAddress(self.deref() as *const Node as *const libc::c_void)
+ TrustedNodeAddress(&*self as *const Node as *const libc::c_void)
}
fn get_bounding_content_box(self) -> Rect<Au> {
@@ -1019,7 +1019,7 @@ pub struct NodeChildrenIterator<'a> {
impl<'a> Iterator<JSRef<'a, Node>> for NodeChildrenIterator<'a> {
fn next(&mut self) -> Option<JSRef<'a, Node>> {
let node = self.current;
- self.current = node.and_then(|node| node.next_sibling().map(|node| *node.root().deref()));
+ self.current = node.and_then(|node| node.next_sibling().map(|node| *node.root()));
node
}
}
@@ -1043,7 +1043,7 @@ pub struct AncestorIterator<'a> {
impl<'a> Iterator<JSRef<'a, Node>> for AncestorIterator<'a> {
fn next(&mut self) -> Option<JSRef<'a, Node>> {
let node = self.current;
- self.current = node.and_then(|node| node.parent_node().map(|node| *node.root().deref()));
+ self.current = node.and_then(|node| node.parent_node().map(|node| *node.root()));
node
}
}