mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Fix a bunch of clippy lints
This commit is contained in:
parent
b1ca3d1cdf
commit
6b215f38ee
58 changed files with 281 additions and 356 deletions
|
@ -137,7 +137,7 @@ impl CSSStyleDeclarationMethods for CSSStyleDeclaration {
|
|||
}
|
||||
});
|
||||
|
||||
result.map(DOMString::from).unwrap_or(DOMString::new())
|
||||
result.map_or(DOMString::new(), DOMString::from)
|
||||
}
|
||||
|
||||
// https://dev.w3.org/csswg/cssom/#dom-cssstyledeclaration-getpropertyvalue
|
||||
|
@ -175,11 +175,10 @@ impl CSSStyleDeclarationMethods for CSSStyleDeclaration {
|
|||
}
|
||||
|
||||
// Step 3 & 4
|
||||
let result = match owner.get_inline_style_declaration(&property) {
|
||||
match owner.get_inline_style_declaration(&property) {
|
||||
Some(declaration) => DOMString::from(declaration.value()),
|
||||
None => DOMString::new(),
|
||||
};
|
||||
result
|
||||
}
|
||||
}
|
||||
|
||||
// https://dev.w3.org/csswg/cssom/#dom-cssstyledeclaration-getpropertypriority
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue