mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
clippy: Fix warnings in components/layout_2020
(#31611)
* clippy: fix warnings in components/layout_2020 * fix: review comments
This commit is contained in:
parent
1d1f239ecc
commit
b03411f567
17 changed files with 59 additions and 69 deletions
|
@ -505,12 +505,9 @@ fn process_offset_parent_query_inner(
|
|||
// "If any of the following holds true return null and terminate
|
||||
// this algorithm: [...] The element’s computed value of the
|
||||
// `position` property is `fixed`."
|
||||
let is_fixed = match fragment {
|
||||
Fragment::Box(fragment) if fragment.style.get_box().position == Position::Fixed => {
|
||||
true
|
||||
},
|
||||
_ => false,
|
||||
};
|
||||
let is_fixed = matches!(
|
||||
fragment, Fragment::Box(fragment) if fragment.style.get_box().position == Position::Fixed
|
||||
);
|
||||
|
||||
if is_body_element {
|
||||
// "If the element is the HTML body element or [...] return zero
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue