Skip to content

Commit 1f591c7

Browse files
asaf-swclaude
andauthored
blockifier_reexecution: remove stale allow(dead_code) (#14399)
Removes a stale `#[allow(dead_code)]` from the `contract_class_mapping_dumper` field of `RpcStateReader` in `state_reader/rpc_state_reader.rs`. The field is NOT dead — only the annotation is removed; no behavior changes. Why it's stale (the field is read in non-test library code): - `RpcStateReader::get_contract_class_mapping_dumper` (rpc_state_reader.rs:393) reads it: `self.contract_class_mapping_dumper.lock().unwrap().clone()`. This public method is called from `RpcBlockReexecutor::get_serializable_data_reexecuted_block` (line 613). - The `ReexecutionStateReader` impl for `RpcStateReader` reads/mutates it (lines 518-521) while collecting declared classes during reexecution. - `RpcBlockReexecutor::new` clones it out of the base-block reader (line 572: `base_block_state_reader.contract_class_mapping_dumper.clone()`). Since the field is read from ordinary library code, removing the annotation produces zero dead_code warnings in both the default and --tests configurations. Verification (RUSTC_WRAPPER unset, CARGO_INCREMENTAL=0): - `scripts/rust_fmt.sh` — clean - `cargo build -p blockifier_reexecution` — zero dead_code/unused warnings (default cfg) - `cargo clippy -p blockifier_reexecution --all-targets` — clean; compiles lib + test targets, confirming the --tests cfg builds with zero dead_code warnings. This is a pure lint-attribute removal (no codegen/runtime effect), so the two clean builds above are the load-bearing proof. The crate's `blockifier_reexecution` test job exercises live GCloud/RPC network access, which is blocked in this sandbox, so a full `cargo test` run was not performed; it is unaffected by removing a lint attribute and runs in CI. Co-authored-by: Claude <noreply@anthropic.com>
1 parent 948af82 commit 1f591c7

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

crates/blockifier_reexecution/src/state_reader/rpc_state_reader.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ pub struct RpcStateReader {
138138
pub(crate) retry_config: RetryConfig,
139139

140140
pub chain_info: ChainInfo,
141-
#[allow(dead_code)]
142141
pub(crate) contract_class_mapping_dumper: Arc<Mutex<Option<StarknetContractClassMapping>>>,
143142
}
144143

0 commit comments

Comments
 (0)