diff options
| author | PgBiel <9021226+PgBiel@users.noreply.github.com> | 2025-06-13 02:58:13 -0300 |
|---|---|---|
| committer | PgBiel <9021226+PgBiel@users.noreply.github.com> | 2025-06-28 22:39:35 -0300 |
| commit | 8f434146d82c0996da40bfc835733ed3b09933a8 (patch) | |
| tree | d0981c830ec42b33169a2216dee47c8db71a1b34 | |
| parent | 40ae2324d1c61b32e68e12a02fa86a5e6ee8415f (diff) | |
clippy lints
| -rw-r--r-- | crates/typst-layout/src/grid/repeated.rs | 6 | ||||
| -rw-r--r-- | crates/typst-library/src/layout/grid/resolve.rs | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/crates/typst-layout/src/grid/repeated.rs b/crates/typst-layout/src/grid/repeated.rs index 2ebd2d9a..a93acd98 100644 --- a/crates/typst-layout/src/grid/repeated.rs +++ b/crates/typst-layout/src/grid/repeated.rs @@ -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, diff --git a/crates/typst-library/src/layout/grid/resolve.rs b/crates/typst-library/src/layout/grid/resolve.rs index c51db2d1..d51b5551 100644 --- a/crates/typst-library/src/layout/grid/resolve.rs +++ b/crates/typst-library/src/layout/grid/resolve.rs @@ -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()); |
