Skip to content

Commit

Permalink
blech32: delete unconstructable iterator struct
Browse files Browse the repository at this point in the history
Recent versions of rustc notice when public structs cannot be
constructed. In this case, the struct in question a copy-and-paste from
the bech32 segwit module, and it was unneeded and (clearly) unused.
  • Loading branch information
apoelstra committed Jun 19, 2024
1 parent a89ff6e commit 4ab1b77
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions src/blech32/decode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -452,19 +452,6 @@ impl<'s> ExactSizeIterator for ByteIter<'s> {
fn len(&self) -> usize { self.iter.len() }
}

/// An iterator over a parsed HRP string data as field elements.
pub struct Fe32Iter<'s> {
iter: AsciiToFe32Iter<iter::Copied<slice::Iter<'s, u8>>>,
}

impl<'s> Iterator for Fe32Iter<'s> {
type Item = Fe32;
#[inline]
fn next(&mut self) -> Option<Fe32> { self.iter.next() }
#[inline]
fn size_hint(&self) -> (usize, Option<usize>) { self.iter.size_hint() }
}

/// Helper iterator adaptor that maps an iterator of valid bech32 character ASCII bytes to an
/// iterator of field elements.
///
Expand Down

0 comments on commit 4ab1b77

Please sign in to comment.