mirror of
https://github.com/servo/servo.git
synced 2025-08-01 03:30:33 +01:00
Auto merge of #5647 - Ms2ger:remove_inline_style_property, r=Manishearth
It makes little sense to use map() in a case where we don't care about the return value.
This commit is contained in:
commit
d2522ea8bf
1 changed files with 2 additions and 2 deletions
|
@ -507,7 +507,7 @@ impl<'a> ElementHelpers<'a> for JSRef<'a, Element> {
|
||||||
|
|
||||||
fn remove_inline_style_property(self, property: DOMString) {
|
fn remove_inline_style_property(self, property: DOMString) {
|
||||||
let mut inline_declarations = self.style_attribute.borrow_mut();
|
let mut inline_declarations = self.style_attribute.borrow_mut();
|
||||||
inline_declarations.as_mut().map(|declarations| {
|
if let &mut Some(ref mut declarations) = &mut *inline_declarations {
|
||||||
let index = declarations.normal
|
let index = declarations.normal
|
||||||
.iter()
|
.iter()
|
||||||
.position(|decl| decl.name() == property);
|
.position(|decl| decl.name() == property);
|
||||||
|
@ -523,7 +523,7 @@ impl<'a> ElementHelpers<'a> for JSRef<'a, Element> {
|
||||||
declarations.important.make_unique().remove(index);
|
declarations.important.make_unique().remove(index);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn update_inline_style(self, property_decl: PropertyDeclaration, style_priority: StylePriority) {
|
fn update_inline_style(self, property_decl: PropertyDeclaration, style_priority: StylePriority) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue