starknet_patricia_storage: delete dead code (unsure, review carefully)#14696
Open
asaf-sw wants to merge 1 commit into
Open
starknet_patricia_storage: delete dead code (unsure, review carefully)#14696asaf-sw wants to merge 1 commit into
asaf-sw wants to merge 1 commit into
Conversation
Removes the unused struct `BorrowedStorage<'a, S: Storage>` from `starknet_patricia_storage::map_storage`. Evidence it is dead: - `BorrowedStorage` has zero references anywhere in the sequencer workspace (whole-word grep across `crates/` matches only its definition), including tests and benches. It has no `impl` blocks and is never constructed. - Zero references in the sibling repos `starkware-industries/sequencer-devops` and `starkware-industries/starkware`. It is a `#[derive(Serialize)]` wrapper around `&mut S: Storage` that was never wired up. Removing it orphans no imports: `Storage` and `Serialize` remain used by other items in the module (e.g. `MapStorage` and the storage-trait impls). Verification (env: RUSTC_WRAPPER unset, CARGO_INCREMENTAL=0): `cargo build -p starknet_patricia_storage` and `... --tests` build with zero dead_code/unused warnings; `cargo clippy` clean; `SEED=0 cargo test` passes.
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.
Caution
REVIEW WITH CARE! THIS PR REQUIRES CAREFUL HUMAN REVIEW.
If you find this to be a false positive comment in detail why this code should be kept and close the PR.
This PR removes the unused struct
BorrowedStorage<'a, S: Storage>fromstarknet_patricia_storage::map_storage.Why it appears dead
BorrowedStoragehas zero references anywhere in the sequencer workspace (a whole-word grep acrosscrates/matches only its definition), including tests and benches. It has noimplblocks and is never constructed.starkware-industries/sequencer-devops,starkware-industries/starkware).#[derive(Serialize)]wrapper around&mut S: Storagethat was never wired up (contrastMapStorage, the used type in the same module).What a human must verify
pub. Confirm no consumer outside the three repos checked above uses it, and that it is not scaffolding for a planned "serialize a borrowed storage" path.Scope notes
StorageandSerializeremain used by other items in the module (MapStorageand the storage-trait impls).Verification (env:
RUSTC_WRAPPERunset,CARGO_INCREMENTAL=0)cargo build -p starknet_patricia_storageandcargo build -p starknet_patricia_storage --tests: zerodead_code/unused_*warnings.cargo clippy -p starknet_patricia_storage --all-targets: clean.SEED=0 cargo test -p starknet_patricia_storage: passes (8 tests).Caution
REVIEW WITH CARE! THIS PR REQUIRES CAREFUL HUMAN REVIEW.
If you find this to be a false positive comment in detail why this code should be kept and close the PR.
Generated by Claude Code