Browse Source

melib/EnvelopeHashBatch: impl len method

memfd
Manos Pitsidianakis 1 year ago
parent
commit
92b25de34e
Signed by untrusted user: epilys GPG Key ID: 73627C2F690DF710
  1. 6
      melib/src/backends.rs

6
melib/src/backends.rs

@ -609,7 +609,11 @@ impl std::convert::TryFrom<&[EnvelopeHash]> for EnvelopeHashBatch {
}
impl EnvelopeHashBatch {
fn iter(&self) -> impl std::iter::Iterator<Item = EnvelopeHash> + '_ {
pub fn iter(&self) -> impl std::iter::Iterator<Item = EnvelopeHash> + '_ {
std::iter::once(self.first).chain(self.rest.iter().cloned())
}
pub fn len(&self) -> usize {
1 + self.rest.len()
}
}
Loading…
Cancel
Save