mirror of
https://github.com/servo/servo.git
synced 2025-06-25 01:24:37 +01:00
Use 'match' instead of 'if'.
This commit is contained in:
parent
ad45bd509e
commit
072ff20140
1 changed files with 5 additions and 2 deletions
|
@ -252,8 +252,11 @@ impl<'self> Element {
|
|||
local_name: DOMString,
|
||||
value: DOMString) {
|
||||
|
||||
if "style" == local_name && *namespace == namespace::Null {
|
||||
self.style_attribute = Some(style::parse_style_attribute(value));
|
||||
match local_name.as_slice() {
|
||||
"style" if *namespace == namespace::Null => {
|
||||
self.style_attribute = Some(style::parse_style_attribute(value))
|
||||
}
|
||||
_ => ()
|
||||
}
|
||||
|
||||
// TODO: update owner document's id hashmap for `document.getElementById()`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue