From 1ce9758f903b08002663219d9246e551f0b1ed18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sun, 26 Mar 2017 20:02:19 +0200 Subject: [PATCH] style: Simplify Number::parse_with_minimum. --- components/style/values/specified/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/style/values/specified/mod.rs b/components/style/values/specified/mod.rs index 963a8137293..1cea83d5329 100644 --- a/components/style/values/specified/mod.rs +++ b/components/style/values/specified/mod.rs @@ -538,8 +538,8 @@ impl Parse for Number { impl Number { fn parse_with_minimum(input: &mut Parser, min: CSSFloat) -> Result { match parse_number(input) { - Ok(value) if value < min => Err(()), - value => value.map(Number), + Ok(value) if value >= min => Ok(Number(value)), + _ => Err(()), } }