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 // Simulate the footer again; the region's 'full' might have
// changed. // changed.
let (footer_height, footer_heights) = self.simulate_footer_heights( let (footer_height, footer_heights) = self.simulate_footer_heights(
self.repeating_footers.iter().map(|x| *x), self.repeating_footers.iter().copied(),
&self.regions, &self.regions,
engine, engine,
disambiguator, disambiguator,
@ -585,7 +585,7 @@ impl<'a> GridLayouter<'a> {
/// footers, and skips to fitting region. /// footers, and skips to fitting region.
pub fn prepare_repeating_footers( pub fn prepare_repeating_footers(
&mut self, &mut self,
footers: impl Iterator<Item = &'a Footer> + ExactSizeIterator + Clone, footers: impl ExactSizeIterator<Item = &'a Footer> + Clone,
at_region_top: bool, at_region_top: bool,
engine: &mut Engine, engine: &mut Engine,
disambiguator: usize, disambiguator: usize,
@ -641,7 +641,7 @@ impl<'a> GridLayouter<'a> {
pub fn simulate_footer_heights( pub fn simulate_footer_heights(
&self, &self,
footers: impl Iterator<Item = &'a Footer> + ExactSizeIterator, footers: impl ExactSizeIterator<Item = &'a Footer>,
regions: &Regions<'_>, regions: &Regions<'_>,
engine: &mut Engine, engine: &mut Engine,
disambiguator: usize, 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 /// 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. /// the column. That is used to find a position for a fixed column cell.
#[allow(clippy::too_many_arguments)]
#[inline] #[inline]
fn find_next_available_position( fn find_next_available_position(
headers: &[Repeatable<Header>], headers: &[Repeatable<Header>],
@ -2398,7 +2399,7 @@ fn skip_auto_index_through_fully_merged_rows(
/// repeating. /// repeating.
fn simulate_footer_repetition(footers: &[Repeatable<Footer>]) -> Vec<Repeatable<Footer>> { fn simulate_footer_repetition(footers: &[Repeatable<Footer>]) -> Vec<Repeatable<Footer>> {
if footers.len() <= 1 { if footers.len() <= 1 {
return footers.iter().cloned().collect(); return footers.to_vec();
} }
let mut ordered_footers = Vec::with_capacity(footers.len()); let mut ordered_footers = Vec::with_capacity(footers.len());