diff options
author | Cameron Zwarich <zwarich@mozilla.com> | 2014-09-19 01:32:30 -0700 |
---|---|---|
committer | Cameron Zwarich <zwarich@mozilla.com> | 2014-09-20 11:54:10 -0700 |
commit | 2c8d51a37c84fb5de531d00c45de9c0020930b11 (patch) | |
tree | 9d65c2f2141edf9bd8b47bb785b7e948e092f831 /components/script/dom/htmlcollection.rs | |
parent | 2adc594e5d8babaadbe1a4e05a8f7d808313728f (diff) | |
download | servo-2c8d51a37c84fb5de531d00c45de9c0020930b11.tar.gz servo-2c8d51a37c84fb5de531d00c45de9c0020930b11.zip |
More progress in the &JSRef -> JSRef conversion
Change all of the <Class>Methods traits to take `self` instead of
`&self`.
Diffstat (limited to 'components/script/dom/htmlcollection.rs')
-rw-r--r-- | components/script/dom/htmlcollection.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/components/script/dom/htmlcollection.rs b/components/script/dom/htmlcollection.rs index d5de946acdd..6a4baf3f5dc 100644 --- a/components/script/dom/htmlcollection.rs +++ b/components/script/dom/htmlcollection.rs @@ -172,7 +172,7 @@ impl HTMLCollection { impl<'a> HTMLCollectionMethods for JSRef<'a, HTMLCollection> { // http://dom.spec.whatwg.org/#dom-htmlcollection-length - fn Length(&self) -> u32 { + fn Length(self) -> u32 { match self.collection { Static(ref elems) => elems.len() as u32, Live(ref root, ref filter) => { @@ -187,7 +187,7 @@ impl<'a> HTMLCollectionMethods for JSRef<'a, HTMLCollection> { } // http://dom.spec.whatwg.org/#dom-htmlcollection-item - fn Item(&self, index: u32) -> Option<Temporary<Element>> { + fn Item(self, index: u32) -> Option<Temporary<Element>> { match self.collection { Static(ref elems) => elems .as_slice() @@ -209,7 +209,7 @@ impl<'a> HTMLCollectionMethods for JSRef<'a, HTMLCollection> { } // http://dom.spec.whatwg.org/#dom-htmlcollection-nameditem - fn NamedItem(&self, key: DOMString) -> Option<Temporary<Element>> { + fn NamedItem(self, key: DOMString) -> Option<Temporary<Element>> { // Step 1. if key.is_empty() { return None; @@ -239,13 +239,13 @@ impl<'a> HTMLCollectionMethods for JSRef<'a, HTMLCollection> { } } - fn IndexedGetter(&self, index: u32, found: &mut bool) -> Option<Temporary<Element>> { + fn IndexedGetter(self, index: u32, found: &mut bool) -> Option<Temporary<Element>> { let maybe_elem = self.Item(index); *found = maybe_elem.is_some(); maybe_elem } - fn NamedGetter(&self, name: DOMString, found: &mut bool) -> Option<Temporary<Element>> { + fn NamedGetter(self, name: DOMString, found: &mut bool) -> Option<Temporary<Element>> { let maybe_elem = self.NamedItem(name); *found = maybe_elem.is_some(); maybe_elem |