From: Tobin Harding Date: Wed, 23 Dec 2020 05:15:09 +0000 (+1100) Subject: Conditionally compile constructor X-Git-Tag: v0.5.0~10^2~11 X-Git-Url: http://internal-gitweb-vhost/script/%22https:/database/struct.EncoderStringWriter.html?a=commitdiff_plain;h=343e97da0e2d0d84af402d94d55caa2e4a9d3859;p=bdk Conditionally compile constructor The `ChunksIterator` constructor is only used when either `electrum` or `esplora` features are enabled. Conditionally build it so that we do not get a clippy warning when building without these features. --- diff --git a/src/wallet/utils.rs b/src/wallet/utils.rs index a71d09c1..d0065d0e 100644 --- a/src/wallet/utils.rs +++ b/src/wallet/utils.rs @@ -156,8 +156,8 @@ pub struct ChunksIterator { size: usize, } +#[cfg(any(feature = "electrum", feature = "esplora"))] impl ChunksIterator { - #[allow(dead_code)] pub fn new(iter: I, size: usize) -> Self { ChunksIterator { iter, size } }