summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/typst-layout/src/grid/repeated.rs6
-rw-r--r--crates/typst-library/src/layout/grid/resolve.rs3
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());