mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01: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
|
@ -45,12 +45,12 @@ impl PluginMethods for Plugin {
|
|||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-plugin-item
|
||||
fn IndexedGetter(&self, _index: u32, _found: &mut bool) -> Option<Root<MimeType>> {
|
||||
fn IndexedGetter(&self, _index: u32) -> Option<Root<MimeType>> {
|
||||
unreachable!()
|
||||
}
|
||||
|
||||
// check-tidy: no specs after this line
|
||||
fn NamedGetter(&self, _name: DOMString, _found: &mut bool) -> Option<Root<MimeType>> {
|
||||
fn NamedGetter(&self, _name: DOMString) -> Option<Root<MimeType>> {
|
||||
unreachable!()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue