Skip to content

chore: clean up unused imports, dead code, and test warnings#131

Open
iajoiner wants to merge 2 commits intomainfrom
chore/remove-unused-imports
Open

chore: clean up unused imports, dead code, and test warnings#131
iajoiner wants to merge 2 commits intomainfrom
chore/remove-unused-imports

Conversation

@iajoiner
Copy link
Contributor

@iajoiner iajoiner commented Jan 14, 2026

Summary

Remove unused imports, dead code, suppress warnings for intentionally unused code, and fix compiler warnings across the codebase.

Changes

  • chain-utils: Remove unused imports and dead functions (read_file, parse_sql, format_statements)
  • attestation_tree: Remove unused StorageInstance import, prefix unused test variable
  • runtime: Remove unused imports and test constant
  • rpc: Add #[allow(unused)] for conditionally used hex module
  • canaries: Remove unused ResultExt import, add explicit lifetime annotations
  • watcher: Remove unused imports and prefix unused variables
  • node: Delete unused EventForwarderDetails and session_keys, use #[expect(dead_code)] with reason for NewFullBase
  • pallets: Remove unused imports and constants in test files, fix type alias parentheses
  • Cargo.toml files: Remove redundant package keys when using workspace
  • proof-of-sql/on-chain-table: Add explicit lifetime annotations to fix hidden lifetime warnings
  • translation-layer: Format imports

Test plan

  • cargo build completes with no warnings
  • cargo test --no-run completes with no warnings

🤖 Generated with Claude Code

@iajoiner iajoiner requested review from a team as code owners January 14, 2026 19:01
@github-actions
Copy link

github-actions bot commented Jan 14, 2026

1.53.1

@iajoiner iajoiner force-pushed the chore/remove-unused-imports branch from 899565d to 990cb96 Compare January 14, 2026 19:26
@iajoiner iajoiner changed the title chore: remove unused imports and dead code chore: clean up unused imports and dead code Jan 15, 2026
@iajoiner iajoiner changed the title chore: clean up unused imports and dead code chore: clean up unused imports, dead code, and test warnings Jan 15, 2026
@iajoiner iajoiner force-pushed the chore/remove-unused-imports branch from 85b0f5e to 6cd76d7 Compare January 15, 2026 02:40
@iajoiner iajoiner enabled auto-merge January 15, 2026 02:42
@iajoiner iajoiner force-pushed the chore/remove-unused-imports branch 2 times, most recently from 416792e to 6a3a0a6 Compare January 16, 2026 14:13
iajoiner and others added 2 commits January 21, 2026 12:53
Remove unused imports, dead code, and suppress warnings for intentionally
unused code across the codebase:

- chain-utils: Remove unused imports and dead code functions (read_file,
  parse_sql, format_statements)
- attestation_tree: Remove unused StorageInstance import, prefix unused test var
- runtime: Remove unused imports and test constant
- rpc: Add #[allow(unused)] for conditionally used hex module
- canaries: Remove unused ResultExt import
- watcher: Remove unused imports and prefix unused variables
- node: Delete unused EventForwarderDetails and session_keys, use
  #[expect(dead_code)] with reason for NewFullBase
- pallets: Remove unused imports and constants in test files

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove redundant `package` keys in Cargo.toml files when using workspace
- Add explicit lifetime annotations to fix hidden lifetime warnings
- Remove unnecessary parentheses around type alias

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@iajoiner iajoiner force-pushed the chore/remove-unused-imports branch from 6a3a0a6 to ff10413 Compare January 21, 2026 17:53
Copy link
Contributor

@tlovell-sxt tlovell-sxt left a comment

Choose a reason for hiding this comment

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

Would be nice to have the CI check for these kinds of things. Probably just need a -- -Dwarnings somewhere

address20: _,
block_number,
block_hash,
block_hash: _,
Copy link
Contributor

Choose a reason for hiding this comment

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

it's strange that it destructured these to _ with a re-assignment rather than just doing like address20, block_number, block_hash, .. }

Comment on lines +6 to +7
use hex as _;

Copy link
Contributor

Choose a reason for hiding this comment

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

can't this just be removed?

//! capabilities that are specific to this project's runtime configuration.

#![warn(missing_docs)]
#![allow(dead_code)]
Copy link
Contributor

Choose a reason for hiding this comment

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

What is even dead in here?

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