Skip to content

Commit 8d71ea1

Browse files
committed
chore(cleanup): drop dead utils::env_compat::read_env_either
Identical re-export of `read_env_with_legacy` with no callers anywhere. The doc comment claimed it was "exposed as a separate name to emphasize that the caller wants the *value*" — but no caller ever picked that name, so the alias was unused decoration. Workspace test sweep stays green (118 + 414 lib tests). Assisted-by: Claude Code:claude-opus-4-7
1 parent 90d2b67 commit 8d71ea1

1 file changed

Lines changed: 0 additions & 8 deletions

File tree

crates/socket-patch-core/src/utils/env_compat.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,6 @@ pub fn warn_legacy_once(legacy_name: &'static str, new_name: &'static str) {
6767

6868
/// Read the new env var; if it isn't set, also probe the legacy name and
6969
/// surface a deprecation warning when the legacy name is set. Returns the
70-
/// new-name value when set, otherwise the legacy value (or `None`).
71-
///
72-
/// Same behavior as `read_env_with_legacy` but exposed as a separate name to
73-
/// emphasize that the caller wants the *value* and accepts either source.
74-
pub fn read_env_either(new_name: &'static str, legacy_name: &'static str) -> Option<String> {
75-
read_env_with_legacy(new_name, legacy_name)
76-
}
77-
7870
/// Renamed env vars whose legacy `SOCKET_PATCH_*` names are still honored.
7971
///
8072
/// First entry of each tuple is the new name (what clap and current code

0 commit comments

Comments
 (0)