clippy lints

This commit is contained in:
PgBiel 2025-06-13 02:58:13 -03:00
parent 40ae2324d1
commit 8f434146d8
2 changed files with 5 additions and 4 deletions

View File

@ -244,7 +244,7 @@ impl<'a> GridLayouter<'a> {
// Simulate the footer again; the region's 'full' might have
// changed.
let (footer_height, footer_heights) = self.simulate_footer_heights(
self.repeating_footers.iter().map(|x| *x),
self.repeating_footers.iter().copied(),
&self.regions,
engine,
disambiguator,
@ -585,7 +585,7 @@ impl<'a> GridLayouter<'a> {
/// footers, and skips to fitting region.
pub fn prepare_repeating_footers(
&mut self,
footers: impl Iterator<Item = &'a Footer> + ExactSizeIterator + Clone,
footers: impl ExactSizeIterator<Item = &'a Footer> + Clone,
at_region_top: bool,
engine: &mut Engine,
disambiguator: usize,
@ -641,7 +641,7 @@ impl<'a> GridLayouter<'a> {
pub fn simulate_footer_heights(
&self,
footers: impl Iterator<Item = &'a Footer> + ExactSizeIterator,
footers: impl ExactSizeIterator<Item = &'a Footer>,
regions: &Regions<'_>,
engine: &mut Engine,
disambiguator: usize,

View File

@ -2272,6 +2272,7 @@ fn resolve_cell_position(
///
/// When `skip_rows` is true, one row is skipped on each iteration, preserving
/// the column. That is used to find a position for a fixed column cell.
#[allow(clippy::too_many_arguments)]
#[inline]
fn find_next_available_position(
headers: &[Repeatable<Header>],
@ -2398,7 +2399,7 @@ fn skip_auto_index_through_fully_merged_rows(
/// repeating.
fn simulate_footer_repetition(footers: &[Repeatable<Footer>]) -> Vec<Repeatable<Footer>> {
if footers.len() <= 1 {
return footers.iter().cloned().collect();
return footers.to_vec();
}
let mut ordered_footers = Vec::with_capacity(footers.len());