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:
Oriol Brufau 2024-01-30 12:46:35 +01:00 committed by GitHub
parent 16cabcf736
commit f7ead9bcb6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
28 changed files with 490 additions and 483 deletions

View file

@ -166,7 +166,7 @@ fn convert_gradient_stops(
let (end_index, end_stop) = stop_items[(i + 1)..]
.iter()
.enumerate()
.find(|&(_, ref stop)| stop.position.is_some())
.find(|(_, stop)| stop.position.is_some())
.unwrap();
let end_offset =
position_to_offset(end_stop.position.as_ref().unwrap(), total_length);
@ -191,7 +191,7 @@ fn convert_gradient_stops(
};
assert!(offset.is_finite());
stops.push(GradientStop {
offset: offset,
offset,
color: style.resolve_color(stop.color.clone()).to_layout(),
})
}