From d909be9d9ee357ca6b24dce3799d3998182dec14 Mon Sep 17 00:00:00 2001 From: Sreeram Garlapati Date: Tue, 26 May 2026 09:02:13 -0700 Subject: [PATCH] chore(spec): remove stale #[allow(dead_code)] from snapshot_summary The four `#[allow(dead_code)]` attributes in `snapshot_summary.rs` were added in #1085 when the module was first introduced, before any caller existed. The chain is now production-live: - `update_snapshot_summaries` is called from `transaction/snapshot.rs` - `truncate_table_summary` is called from `update_snapshot_summaries` - `get_prop` is called 6 times from `truncate_table_summary` - `update_totals` is called 6 times from `update_snapshot_summaries` None of these need the suppression any more. `cargo check -p iceberg` and `cargo clippy -p iceberg --all-features --tests -- -D warnings` both stay clean after the removals. Prompted by review feedback on #2511, kept out of that PR to keep its scope focused on the panic fix. --- crates/iceberg/src/spec/snapshot_summary.rs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/crates/iceberg/src/spec/snapshot_summary.rs b/crates/iceberg/src/spec/snapshot_summary.rs index c67ee37d3e..0e6069519e 100644 --- a/crates/iceberg/src/spec/snapshot_summary.rs +++ b/crates/iceberg/src/spec/snapshot_summary.rs @@ -329,7 +329,6 @@ where T: PartialOrd + Default + ToString { } } -#[allow(dead_code)] pub(crate) fn update_snapshot_summaries( summary: Summary, previous_summary: Option<&Summary>, @@ -408,7 +407,6 @@ pub(crate) fn update_snapshot_summaries( Ok(summary) } -#[allow(dead_code)] fn get_prop(previous_summary: &Summary, prop: &str) -> Result { let value_str = previous_summary .additional_properties @@ -424,7 +422,6 @@ fn get_prop(previous_summary: &Summary, prop: &str) -> Result { }) } -#[allow(dead_code)] fn truncate_table_summary(mut summary: Summary, previous_summary: &Summary) -> Result { for prop in [ TOTAL_DATA_FILES, @@ -481,7 +478,6 @@ fn truncate_table_summary(mut summary: Summary, previous_summary: &Summary) -> R Ok(summary) } -#[allow(dead_code)] fn update_totals( summary: &mut Summary, previous_summary: Option<&Summary>,