mirror of
https://github.com/servo/servo
synced 2026-04-26 01:25:32 +02: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:
@@ -50,12 +50,12 @@ impl PluginArrayMethods for PluginArray {
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-pluginarray-item
|
||||
fn IndexedGetter(&self, _index: u32, _found: &mut bool) -> Option<Root<Plugin>> {
|
||||
fn IndexedGetter(&self, _index: u32) -> Option<Root<Plugin>> {
|
||||
None
|
||||
}
|
||||
|
||||
// check-tidy: no specs after this line
|
||||
fn NamedGetter(&self, _name: DOMString, _found: &mut bool) -> Option<Root<Plugin>> {
|
||||
fn NamedGetter(&self, _name: DOMString) -> Option<Root<Plugin>> {
|
||||
None
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user