mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Use Option<T> to return from getters
This removes the cumbersome &mut bool argument and offers overall a more readable code.
This commit is contained in:
parent
6e1523f4ae
commit
7dfb336be8
22 changed files with 72 additions and 109 deletions
|
@ -230,9 +230,9 @@ impl HTMLFormElementMethods for HTMLFormElement {
|
|||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-form-item
|
||||
fn IndexedGetter(&self, index: u32, found: &mut bool) -> Option<Root<Element>> {
|
||||
fn IndexedGetter(&self, index: u32) -> Option<Root<Element>> {
|
||||
let elements = self.Elements();
|
||||
elements.IndexedGetter(index, found)
|
||||
elements.IndexedGetter(index)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue