diff options
author | David Zbarsky <dzbarsky@gmail.com> | 2015-11-02 22:26:50 -0800 |
---|---|---|
committer | David Zbarsky <dzbarsky@gmail.com> | 2015-11-03 19:51:46 -0800 |
commit | 722aa86c895b42798d60bcada41b0175dbafba52 (patch) | |
tree | 45d54ac56e4461f1ab3316a7796c4a8bc710e5b8 /components/script/dom/text.rs | |
parent | ca56ebbb09f3c258d10e7a7fa276d42fe258d893 (diff) | |
download | servo-722aa86c895b42798d60bcada41b0175dbafba52.tar.gz servo-722aa86c895b42798d60bcada41b0175dbafba52.zip |
Get rid of a bunch of explicit derefs
Diffstat (limited to 'components/script/dom/text.rs')
-rw-r--r-- | components/script/dom/text.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/components/script/dom/text.rs b/components/script/dom/text.rs index 21e2edb8193..58b34f41b43 100644 --- a/components/script/dom/text.rs +++ b/components/script/dom/text.rs @@ -58,7 +58,7 @@ impl TextMethods for Text { // Step 5. let node = self.upcast::<Node>(); let owner_doc = node.owner_doc(); - let new_node = owner_doc.r().CreateTextNode(new_data); + let new_node = owner_doc.CreateTextNode(new_data); // Step 6. let parent = node.GetParentNode(); if let Some(ref parent) = parent { @@ -79,10 +79,10 @@ impl TextMethods for Text { // https://dom.spec.whatwg.org/#dom-text-wholetext fn WholeText(&self) -> DOMString { let first = self.upcast::<Node>().inclusively_preceding_siblings() - .take_while(|node| node.r().is::<Text>()) + .take_while(|node| node.is::<Text>()) .last().unwrap(); - let nodes = first.r().inclusively_following_siblings() - .take_while(|node| node.r().is::<Text>()); + let nodes = first.inclusively_following_siblings() + .take_while(|node| node.is::<Text>()); let mut text = DOMString::new(); for ref node in nodes { let cdata = node.downcast::<CharacterData>().unwrap(); |