aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/text.rs
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2015-08-27 22:15:54 +0200
committerAnthony Ramine <n.oxyde@gmail.com>2015-08-27 22:27:43 +0200
commit709d347872e37ab2358e057d24557b9977238ecd (patch)
tree89f726bf207325eea8a8ca316f6d77d8c88432cb /components/script/dom/text.rs
parent856fda7f2e3fe4abd6de247e8bdaf8cedf3764c2 (diff)
downloadservo-709d347872e37ab2358e057d24557b9977238ecd.tar.gz
servo-709d347872e37ab2358e057d24557b9977238ecd.zip
Make the traits for the IDL interfaces take &self
Diffstat (limited to 'components/script/dom/text.rs')
-rw-r--r--components/script/dom/text.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/dom/text.rs b/components/script/dom/text.rs
index cf4b85a9480..2eac167ca51 100644
--- a/components/script/dom/text.rs
+++ b/components/script/dom/text.rs
@@ -49,9 +49,9 @@ impl Text {
}
}
-impl<'a> TextMethods for &'a Text {
+impl TextMethods for Text {
// https://dom.spec.whatwg.org/#dom-text-splittextoffset
- fn SplitText(self, offset: u32) -> Fallible<Root<Text>> {
+ fn SplitText(&self, offset: u32) -> Fallible<Root<Text>> {
let cdata = CharacterDataCast::from_ref(self);
// Step 1.
let length = cdata.Length();
@@ -87,7 +87,7 @@ impl<'a> TextMethods for &'a Text {
}
// https://dom.spec.whatwg.org/#dom-text-wholetext
- fn WholeText(self) -> DOMString {
+ fn WholeText(&self) -> DOMString {
let first = NodeCast::from_ref(self).inclusively_preceding_siblings()
.take_while(|node| node.r().is_text())
.last().unwrap();