mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
style: Simplify PropertyDeclarationBlock::get a little.
Depends On D3747 Differential Revision: https://phabricator.services.mozilla.com/D3748
This commit is contained in:
parent
b20bbea033
commit
249b865eb8
1 changed files with 2 additions and 8 deletions
|
@ -305,14 +305,8 @@ impl PropertyDeclarationBlock {
|
|||
}
|
||||
}
|
||||
|
||||
self.declarations.iter().enumerate().find(|&(_, decl)| decl.id() == property).map(|(i, decl)| {
|
||||
let importance = if self.declarations_importance[i] {
|
||||
Importance::Important
|
||||
} else {
|
||||
Importance::Normal
|
||||
};
|
||||
(decl, importance)
|
||||
})
|
||||
self.declaration_importance_iter()
|
||||
.find(|(declaration, _)| declaration.id() == property)
|
||||
}
|
||||
|
||||
fn shorthand_to_css(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue