Skip to content

Commit

Permalink
style: Use map_or instead of map(..) == Some(false).
Browse files Browse the repository at this point in the history
  • Loading branch information
emilio committed Oct 4, 2017
1 parent 583d89a commit c4dbbf0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/style/custom_properties.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c4dbbf0

Please sign in to comment.