mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Use new if let
syntax wherever possible. Fixes #4153.
This commit is contained in:
parent
09c36de8f1
commit
08ac0766ed
25 changed files with 178 additions and 262 deletions
|
@ -60,9 +60,8 @@ impl<'a> VirtualMethods for JSRef<'a, HTMLOptGroupElement> {
|
|||
}
|
||||
|
||||
fn after_set_attr(&self, attr: JSRef<Attr>) {
|
||||
match self.super_type() {
|
||||
Some(ref s) => s.after_set_attr(attr),
|
||||
_ => ()
|
||||
if let Some(ref s) = self.super_type() {
|
||||
s.after_set_attr(attr);
|
||||
}
|
||||
|
||||
match attr.local_name() {
|
||||
|
@ -75,14 +74,13 @@ impl<'a> VirtualMethods for JSRef<'a, HTMLOptGroupElement> {
|
|||
child.set_enabled_state(false);
|
||||
}
|
||||
},
|
||||
_ => ()
|
||||
_ => (),
|
||||
}
|
||||
}
|
||||
|
||||
fn before_remove_attr(&self, attr: JSRef<Attr>) {
|
||||
match self.super_type() {
|
||||
Some(ref s) => s.before_remove_attr(attr),
|
||||
_ => ()
|
||||
if let Some(ref s) = self.super_type() {
|
||||
s.before_remove_attr(attr);
|
||||
}
|
||||
|
||||
match attr.local_name() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue