aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlcollection.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/htmlcollection.rs')
-rw-r--r--components/script/dom/htmlcollection.rs12
1 files changed, 4 insertions, 8 deletions
diff --git a/components/script/dom/htmlcollection.rs b/components/script/dom/htmlcollection.rs
index 95134556bc0..2f226590719 100644
--- a/components/script/dom/htmlcollection.rs
+++ b/components/script/dom/htmlcollection.rs
@@ -317,17 +317,13 @@ impl HTMLCollectionMethods for HTMLCollection {
}
// https://dom.spec.whatwg.org/#dom-htmlcollection-item
- fn IndexedGetter(&self, index: u32, found: &mut bool) -> Option<Root<Element>> {
- let maybe_elem = self.Item(index);
- *found = maybe_elem.is_some();
- maybe_elem
+ fn IndexedGetter(&self, index: u32) -> Option<Root<Element>> {
+ self.Item(index)
}
// check-tidy: no specs after this line
- fn NamedGetter(&self, name: DOMString, found: &mut bool) -> Option<Root<Element>> {
- let maybe_elem = self.NamedItem(name);
- *found = maybe_elem.is_some();
- maybe_elem
+ fn NamedGetter(&self, name: DOMString) -> Option<Root<Element>> {
+ self.NamedItem(name)
}
// https://dom.spec.whatwg.org/#interface-htmlcollection