mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
style: Make Contain::parse simpler
This commit is contained in:
parent
7a9f99eda8
commit
aa1b9a25f6
1 changed files with 2 additions and 12 deletions
|
@ -553,18 +553,8 @@ impl Parse for Contain {
|
|||
"layout" => Some(Contain::LAYOUT),
|
||||
"style" => Some(Contain::STYLE),
|
||||
"paint" => Some(Contain::PAINT),
|
||||
"strict" => {
|
||||
if result.is_empty() {
|
||||
return Ok(Contain::STRICT | Contain::STRICT_BITS)
|
||||
}
|
||||
None
|
||||
},
|
||||
"none" => {
|
||||
if result.is_empty() {
|
||||
return Ok(result)
|
||||
}
|
||||
None
|
||||
},
|
||||
"strict" if result.is_empty() => return Ok(Contain::STRICT | Contain::STRICT_BITS),
|
||||
"none" if result.is_empty() => return Ok(result),
|
||||
_ => None
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue