Skip to content

chore(spec): remove stale #[allow(dead_code)] from snapshot_summary#2514

Open
SreeramGarlapati wants to merge 1 commit into
apache:mainfrom
SreeramGarlapati:chore/snapshot-summary-dead-code-cleanup
Open

chore(spec): remove stale #[allow(dead_code)] from snapshot_summary#2514
SreeramGarlapati wants to merge 1 commit into
apache:mainfrom
SreeramGarlapati:chore/snapshot-summary-dead-code-cleanup

Conversation

@SreeramGarlapati
Copy link
Copy Markdown

@SreeramGarlapati SreeramGarlapati commented May 26, 2026

Which issue does this PR close?

Follow-up to review feedback on #2511 (thread).

What changes are included in this PR?

Removes all four #[allow(dead_code)] attributes in crates/iceberg/src/spec/snapshot_summary.rs. They 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 — the dead_code lint is silent without them.

Kept out of #2511 to keep that PR's scope focused on the overwrite-truncate panic fix.

Are these changes tested?

cargo check -p iceberg and cargo clippy -p iceberg --all-features --tests -- -D warnings both stay clean after the removals — i.e. no dead_code warning re-emerges.

The four `#[allow(dead_code)]` attributes in `snapshot_summary.rs` were
added in apache#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 apache#2511, kept out of that PR to keep its
scope focused on the panic fix.
Copy link
Copy Markdown
Contributor

@dannycjones dannycjones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just noticed the same reviewing this file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants