aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom
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
parentee4c56bd8ba333ee8e4b21e0678d406a67a79b66 (diff)
downloadservo-13c7cf928a5817de315a58a4fa15dc9b7fdc3d7f.tar.gz
servo-13c7cf928a5817de315a58a4fa15dc9b7fdc3d7f.zip
Stop calling deref() and deref_mut() explicitly.
Diffstat (limited to 'components/script/dom')
-rw-r--r--components/script/dom/bindings/js.rs2
-rw-r--r--components/script/dom/element.rs2
-rw-r--r--components/script/dom/node.rs8
3 files changed, 6 insertions, 6 deletions
diff --git a/components/script/dom/bindings/js.rs b/components/script/dom/bindings/js.rs
index 40230e9198e..c56618d2a13 100644
--- a/components/script/dom/bindings/js.rs
+++ b/components/script/dom/bindings/js.rs
@@ -634,7 +634,7 @@ impl<'a, T: Reflectable> JSRef<'a, T> {
impl<'a, T: Reflectable> Reflectable for JSRef<'a, T> {
fn reflector<'a>(&'a self) -> &'a Reflector {
- self.deref().reflector()
+ (**self).reflector()
}
}
diff --git a/components/script/dom/element.rs b/components/script/dom/element.rs
index efafdbe7b11..98dcb3b0be1 100644
--- a/components/script/dom/element.rs
+++ b/components/script/dom/element.rs
@@ -505,7 +505,7 @@ impl<'a> ElementHelpers<'a> for JSRef<'a, Element> {
fn update_inline_style(self, property_decl: style::PropertyDeclaration, style_priority: StylePriority) {
let mut inline_declarations = self.style_attribute().borrow_mut();
- if let Some(ref mut declarations) = *inline_declarations.deref_mut() {
+ if let &Some(ref mut declarations) = &mut *inline_declarations {
let existing_declarations = if style_priority == StylePriority::Important {
declarations.important.make_unique()
} else {
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
}
}