зеркало из https://github.com/mozilla/gecko-dev.git
servo: Merge #19692 - style: Make Contain::parse simpler (from stevel98:Contain); r=emilio
<!-- Please describe your changes on the following line: --> --- Makes Contain::parse slightly simpler, as discussed in #19682 - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #19682 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests because refactoring Source-Repo: https://github.com/servo/servo Source-Revision: 0393f9d231ce146761ed6b6b635ac040adfb07f3 --HG-- extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear extra : subtree_revision : 80573b78a8a266eec84f2b72ac157491219425c8
This commit is contained in:
Родитель
fb4b1616ab
Коммит
e97719a4e8
|
@ -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
|
||||
};
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче