From 343e97da0e2d0d84af402d94d55caa2e4a9d3859 Mon Sep 17 00:00:00 2001 From: Tobin Harding Date: Wed, 23 Dec 2020 16:15:09 +1100 Subject: [PATCH] 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. --- src/wallet/utils.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 } }