mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
Lint layout_2013 with clippy (#31221)
* Lint layout_2013 with clippy CARGO_BUILD_RUSTC=rustc cargo clippy --fix -p layout_2013 --broken-code * ./mach fmt * Cosmetic adjustments
This commit is contained in:
parent
16cabcf736
commit
f7ead9bcb6
28 changed files with 490 additions and 483 deletions
|
@ -742,6 +742,12 @@ impl AbsoluteDescendants {
|
|||
}
|
||||
}
|
||||
|
||||
impl Default for AbsoluteDescendants {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
/// Information about each absolutely-positioned descendant of the given flow.
|
||||
#[derive(Clone)]
|
||||
pub struct AbsoluteDescendantInfo {
|
||||
|
@ -826,6 +832,12 @@ impl LateAbsolutePositionInfo {
|
|||
}
|
||||
}
|
||||
|
||||
impl Default for LateAbsolutePositionInfo {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
pub struct FragmentationContext {
|
||||
pub available_block_size: Au,
|
||||
|
@ -944,7 +956,7 @@ impl fmt::Debug for BaseFlow {
|
|||
"".to_owned()
|
||||
};
|
||||
|
||||
let absolute_descendants_string = if self.abs_descendants.len() > 0 {
|
||||
let absolute_descendants_string = if !self.abs_descendants.is_empty() {
|
||||
format!("\nabs-descendents={}", self.abs_descendants.len())
|
||||
} else {
|
||||
"".to_owned()
|
||||
|
@ -1144,7 +1156,7 @@ impl BaseFlow {
|
|||
/// Return a new BaseFlow like this one but with the given children list
|
||||
pub fn clone_with_children(&self, children: FlowList) -> BaseFlow {
|
||||
BaseFlow {
|
||||
children: children,
|
||||
children,
|
||||
restyle_damage: self.restyle_damage |
|
||||
ServoRestyleDamage::REPAINT |
|
||||
ServoRestyleDamage::REFLOW_OUT_OF_FLOW |
|
||||
|
@ -1153,7 +1165,7 @@ impl BaseFlow {
|
|||
floats: self.floats.clone(),
|
||||
abs_descendants: self.abs_descendants.clone(),
|
||||
absolute_cb: self.absolute_cb.clone(),
|
||||
clip: self.clip.clone(),
|
||||
clip: self.clip,
|
||||
|
||||
..*self
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue