From c5fd35663fa8160d00e88b31b5c1d8cdc6856cf5 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Fri, 9 Jan 2026 10:03:49 -0800 Subject: [PATCH] work --- rust/pspp/src/output/pivot/output.rs | 17 ++++++++++------- rust/pspp/src/output/pivot/value.rs | 2 -- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/rust/pspp/src/output/pivot/output.rs b/rust/pspp/src/output/pivot/output.rs index 6c5040295b..9be29f93c2 100644 --- a/rust/pspp/src/output/pivot/output.rs +++ b/rust/pspp/src/output/pivot/output.rs @@ -140,8 +140,10 @@ impl PivotTable { fn create_aux_table(&self, area: Area, axis: Axis2, cells: I) -> Table where - I: Iterator> + ExactSizeIterator, + I: IntoIterator>, + I::IntoIter: ExactSizeIterator, { + let cells = cells.into_iter(); let mut table = Table::new( CellPos::for_axis((axis, cells.len()), 1), CellPos::new(0, 0), @@ -149,7 +151,7 @@ impl PivotTable { self.borders(false), self, ); - for (z, row) in cells.enumerate() { + for (z, row) in cells.into_iter().enumerate() { table.put( CellRect::for_cell(CellPos::for_axis((axis, z), 0)), CellInner::new(area, row), @@ -160,8 +162,10 @@ impl PivotTable { fn create_aux_table_if_nonempty(&self, area: Area, rows: I) -> Option where - I: Iterator> + ExactSizeIterator, + I: IntoIterator>, + I::IntoIter: ExactSizeIterator, { + let rows = rows.into_iter(); if rows.len() > 0 { Some(self.create_aux_table(area, Axis2::Y, rows)) } else { @@ -287,7 +291,7 @@ impl PivotTable { Some(self.create_aux_table( Area::Title, Axis2::Y, - [self.metadata.title.as_ref()?.clone()].into_iter(), + [self.metadata.title.as_ref()?.clone()], )) } @@ -313,8 +317,7 @@ impl PivotTable { [ Box::new(name), dimension.nth_leaf(layer_index).unwrap().name.clone(), - ] - .into_iter(), + ], ) }) .collect() @@ -326,7 +329,7 @@ impl PivotTable { Some(self.create_aux_table( Area::Caption, Axis2::Y, - [self.metadata.caption.as_ref()?.clone()].into_iter(), + [self.metadata.caption.as_ref()?.clone()], )) } diff --git a/rust/pspp/src/output/pivot/value.rs b/rust/pspp/src/output/pivot/value.rs index 263167b61a..9ee505f103 100644 --- a/rust/pspp/src/output/pivot/value.rs +++ b/rust/pspp/src/output/pivot/value.rs @@ -984,8 +984,6 @@ impl TemplateValue { display: &DisplayValue<'a>, f: &mut std::fmt::Formatter<'_>, ) -> std::fmt::Result { - dbg!(self); - #[derive(Copy, Clone, Debug)] struct InnerTemplate<'b> { template: &'b str, -- 2.30.2