chore: clean up unused imports, dead code, and test warnings#131
Open
chore: clean up unused imports, dead code, and test warnings#131
Conversation
1.53.1 |
899565d to
990cb96
Compare
85b0f5e to
6cd76d7
Compare
416792e to
6a3a0a6
Compare
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>
6a3a0a6 to
ff10413
Compare
tlovell-sxt
reviewed
Jan 21, 2026
Contributor
tlovell-sxt
left a comment
There was a problem hiding this comment.
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: _, |
Contributor
There was a problem hiding this comment.
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 _; | ||
|
|
Contributor
There was a problem hiding this comment.
can't this just be removed?
| //! capabilities that are specific to this project's runtime configuration. | ||
|
|
||
| #![warn(missing_docs)] | ||
| #![allow(dead_code)] |
Contributor
There was a problem hiding this comment.
What is even dead in here?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Remove unused imports, dead code, suppress warnings for intentionally unused code, and fix compiler warnings across the codebase.
Changes
read_file,parse_sql,format_statements)StorageInstanceimport, prefix unused test variable#[allow(unused)]for conditionally used hex moduleResultExtimport, add explicit lifetime annotationsEventForwarderDetailsandsession_keys, use#[expect(dead_code)]with reason forNewFullBasepackagekeys when using workspaceTest plan
cargo buildcompletes with no warningscargo test --no-runcompletes with no warnings🤖 Generated with Claude Code