From c51becac60497e8085a2dac6ca9125e055c34db1 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 6 Jun 2026 05:30:26 +0000 Subject: [PATCH] apollo_node_config: remove stale allow(dead_code) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removes a stale `#[allow(dead_code)]` from the `VERSION_META` constant in `version.rs`. The constant is NOT dead — it is read unconditionally in production code: - `full_version_str()` matches on `VERSION_META` (version.rs:43) to decide whether to append the dev metadata suffix. - `full_version_str()` is evaluated by the `pub const VERSION_FULL` (version.rs:22), a public entry point. So `VERSION_META` is reachable from a live public root and the annotation is stale. Only the annotation is removed; no behavior changes. Note: the sibling annotations in this file (on `Metadata`, `metadata_str`, `STABLE_VERSION_META`, `DEV_VERSION_META`) are intentionally KEPT — those items are only reachable from `version_test.rs` (the `Metadata::Stable` variant is never constructed and `metadata_str` is only called from the test), so they are genuinely dead in the default build and their annotations are load-bearing. Verification (RUSTC_WRAPPER unset, CARGO_INCREMENTAL=0): - `scripts/rust_fmt.sh` — clean - `cargo build -p apollo_node_config` — zero dead_code warnings - `cargo clippy -p apollo_node_config --all-targets` — clean (covers --tests cfg) - `SEED=0 cargo test -p apollo_node_config` — 16 passed, 0 failed --- crates/apollo_node_config/src/version.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/crates/apollo_node_config/src/version.rs b/crates/apollo_node_config/src/version.rs index b5ba9580f37..298488a0adf 100644 --- a/crates/apollo_node_config/src/version.rs +++ b/crates/apollo_node_config/src/version.rs @@ -13,7 +13,6 @@ const VERSION_PATCH: u32 = 0; /// Version metadata to append to the version string. /// Expected values are `dev` and `stable`. -#[allow(dead_code)] const VERSION_META: Metadata = Metadata::Dev; /// Textual version string.