Skip to content

Commit 014e992

Browse files
committed
Fix feature-dependent clippy complaints.
1 parent a886f37 commit 014e992

File tree

1 file changed

+10
-14
lines changed

1 file changed

+10
-14
lines changed

zcash_keys/src/keys.rs

+10-14
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,6 @@ impl Display for UnifiedKeyError {
119119
UnifiedKeyError::Transparent(e) => {
120120
write!(_f, "Transparent key derivation error: {}", e)
121121
}
122-
#[cfg(not(any(feature = "orchard", feature = "transparent-inputs")))]
123-
other => {
124-
unreachable!("Unhandled UnifiedKeyError variant {:?}", other)
125-
}
126122
}
127123
}
128124
}
@@ -608,26 +604,26 @@ impl UnifiedAddressRequest {
608604
/// Returns `None` if the request would result in the generation of an address without any
609605
/// receivers.
610606
pub fn new(
611-
has_orchard: bool,
612-
has_sapling: bool,
613-
has_p2pkh: bool,
607+
_has_orchard: bool,
608+
_has_sapling: bool,
609+
_has_p2pkh: bool,
614610
expiry_height: Option<BlockHeight>,
615611
expiry_time: Option<u64>,
616612
) -> Option<Self> {
617613
#[cfg(not(feature = "orchard"))]
618-
let has_orchard = false;
614+
let _has_orchard = false;
619615
#[cfg(not(feature = "sapling"))]
620-
let has_sapling = false;
616+
let _has_sapling = false;
621617
#[cfg(not(feature = "transparent-inputs"))]
622-
let has_p2pkh = false;
618+
let _has_p2pkh = false;
623619

624-
if !(has_sapling || has_orchard || has_p2pkh) {
620+
if !(_has_sapling || _has_orchard || _has_p2pkh) {
625621
None
626622
} else {
627623
Some(Self {
628-
has_orchard,
629-
has_sapling,
630-
has_p2pkh,
624+
has_orchard: _has_orchard,
625+
has_sapling: _has_sapling,
626+
has_p2pkh: _has_p2pkh,
631627
expiry_height,
632628
expiry_time,
633629
})

0 commit comments

Comments
 (0)