From c4dbbf0656acdfc2270ae0dbdcc86fac006ca71b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Wed, 4 Oct 2017 14:53:05 +0200 Subject: [PATCH] style: Use map_or instead of map(..) == Some(false). --- components/style/custom_properties.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/style/custom_properties.rs b/components/style/custom_properties.rs index 40b0ce89f965..507137b3728e 100644 --- a/components/style/custom_properties.rs +++ b/components/style/custom_properties.rs @@ -607,7 +607,7 @@ fn substitute_one( if invalid.contains(name) { return Err(()); } - let computed_value = if specified_value.references.map(|set| set.is_empty()) == Some(false) { + let computed_value = if specified_value.references.map_or(false, |set| !set.is_empty()) { let mut partial_computed_value = ComputedValue::empty(); let mut input = ParserInput::new(&specified_value.css); let mut input = Parser::new(&mut input);