Making fixes based on suggestions from nox and SimonSapin

This commit is contained in:
David Raifaizen 2016-03-02 23:46:09 -05:00 committed by Simon Sapin
parent 47279179fa
commit 0985d7563f
2 changed files with 26 additions and 38 deletions

View file

@ -699,11 +699,12 @@ impl Element {
}
fn sync_property_with_attrs_style(&self) {
let mut style_str = String::new();
if let &Some(ref declarations) = &*self.style_attribute().borrow() {
style_str.push_str(&declarations.serialize());
let style_str = if let &Some(ref declarations) = &*self.style_attribute().borrow() {
declarations.serialize()
}
else {
String::new()
};
let new_style = AttrValue::String(style_str);