]> Untitled Git - bdk/commitdiff
Conditionally compile constructor
authorTobin Harding <me@tobin.cc>
Wed, 23 Dec 2020 05:15:09 +0000 (16:15 +1100)
committerTobin Harding <me@tobin.cc>
Wed, 24 Feb 2021 02:30:47 +0000 (13:30 +1100)
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

index a71d09c14ac77dd9335f9138ca06c94588bcf236..d0065d0ea1b598086360450d0d098d3dc0a5a552 100644 (file)
@@ -156,8 +156,8 @@ pub struct ChunksIterator<I: Iterator> {
     size: usize,
 }
 
+#[cfg(any(feature = "electrum", feature = "esplora"))]
 impl<I: Iterator> ChunksIterator<I> {
-    #[allow(dead_code)]
     pub fn new(iter: I, size: usize) -> Self {
         ChunksIterator { iter, size }
     }