aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmltextareaelement.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/htmltextareaelement.rs')
-rw-r--r--components/script/dom/htmltextareaelement.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/components/script/dom/htmltextareaelement.rs b/components/script/dom/htmltextareaelement.rs
index 3c66ac6174a..b7d99f037c4 100644
--- a/components/script/dom/htmltextareaelement.rs
+++ b/components/script/dom/htmltextareaelement.rs
@@ -70,8 +70,7 @@ impl LayoutHTMLTextAreaElementHelpers for LayoutJS<HTMLTextAreaElement> {
unsafe {
(*self.upcast::<Element>().unsafe_get())
.get_attr_for_layout(&ns!(), &atom!("cols"))
- .map(AttrValue::as_uint)
- .unwrap_or(DEFAULT_COLS)
+ .map_or(DEFAULT_COLS, AttrValue::as_uint)
}
}
@@ -80,8 +79,7 @@ impl LayoutHTMLTextAreaElementHelpers for LayoutJS<HTMLTextAreaElement> {
unsafe {
(*self.upcast::<Element>().unsafe_get())
.get_attr_for_layout(&ns!(), &atom!("rows"))
- .map(AttrValue::as_uint)
- .unwrap_or(DEFAULT_ROWS)
+ .map_or(DEFAULT_ROWS, AttrValue::as_uint)
}
}
}