From d22cd7f027df130fd77e8998d7d6233d57f6f701 Mon Sep 17 00:00:00 2001 From: Kris Nuttycombe Date: Wed, 11 Dec 2024 11:05:15 -0700 Subject: [PATCH] Fix feature-dependent clippy complaints. --- zcash_keys/src/keys.rs | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/zcash_keys/src/keys.rs b/zcash_keys/src/keys.rs index cefdf5853..0ea407952 100644 --- a/zcash_keys/src/keys.rs +++ b/zcash_keys/src/keys.rs @@ -119,10 +119,6 @@ impl Display for UnifiedKeyError { UnifiedKeyError::Transparent(e) => { write!(_f, "Transparent key derivation error: {}", e) } - #[cfg(not(any(feature = "orchard", feature = "transparent-inputs")))] - other => { - unreachable!("Unhandled UnifiedKeyError variant {:?}", other) - } } } } @@ -610,26 +606,26 @@ impl UnifiedAddressRequest { /// Returns `None` if the request would result in the generation of an address without any /// receivers. pub fn new( - has_orchard: bool, - has_sapling: bool, - has_p2pkh: bool, + _has_orchard: bool, + _has_sapling: bool, + _has_p2pkh: bool, expiry_height: Option, expiry_time: Option, ) -> Option { #[cfg(not(feature = "orchard"))] - let has_orchard = false; + let _has_orchard = false; #[cfg(not(feature = "sapling"))] - let has_sapling = false; + let _has_sapling = false; #[cfg(not(feature = "transparent-inputs"))] - let has_p2pkh = false; + let _has_p2pkh = false; - if !(has_sapling || has_orchard || has_p2pkh) { + if !(_has_sapling || _has_orchard || _has_p2pkh) { None } else { Some(Self { - has_orchard, - has_sapling, - has_p2pkh, + has_orchard: _has_orchard, + has_sapling: _has_sapling, + has_p2pkh: _has_p2pkh, expiry_height, expiry_time, })