aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmltablesectionelement.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/htmltablesectionelement.rs')
-rw-r--r--components/script/dom/htmltablesectionelement.rs22
1 files changed, 11 insertions, 11 deletions
diff --git a/components/script/dom/htmltablesectionelement.rs b/components/script/dom/htmltablesectionelement.rs
index 9e4c8111e5f..1728bb6e8d2 100644
--- a/components/script/dom/htmltablesectionelement.rs
+++ b/components/script/dom/htmltablesectionelement.rs
@@ -66,28 +66,28 @@ impl<'a> VirtualMethods for JSRef<'a, HTMLTableSectionElement> {
}
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() {
&atom!("bgcolor") => {
- self.background_color.set(str::parse_legacy_color(attr.value().as_slice()).ok())
- }
- _ => {}
+ self.background_color.set(str::parse_legacy_color(attr.value().as_slice()).ok());
+ },
+ _ => ()
}
}
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() {
- &atom!("bgcolor") => self.background_color.set(None),
- _ => {}
+ &atom!("bgcolor") => {
+ self.background_color.set(None);
+ },
+ _ => ()
}
}
}