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.
This commit is contained in:
Tobin Harding
2020-12-23 16:15:09 +11:00
parent ba8ce7233d
commit 343e97da0e

View 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 }
}