aboutsummaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
Diffstat (limited to 'components')
-rw-r--r--components/style/properties/longhand/inherited_table.mako.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/components/style/properties/longhand/inherited_table.mako.rs b/components/style/properties/longhand/inherited_table.mako.rs
index 21930ed0114..c80fe9779fe 100644
--- a/components/style/properties/longhand/inherited_table.mako.rs
+++ b/components/style/properties/longhand/inherited_table.mako.rs
@@ -113,15 +113,11 @@ ${helpers.single_keyword("caption-side", "top bottom",
Err(()) => (),
Ok(length) => {
first = Some(length);
- match specified::Length::parse_non_negative(input) {
- Err(()) => (),
- Ok(length) => second = Some(length),
+ if let Ok(len) = input.try(|input| specified::Length::parse_non_negative(input)) {
+ second = Some(len);
}
}
}
- if input.next().is_ok() {
- return Err(())
- }
match (first, second) {
(None, None) => Err(()),
(Some(length), None) => {