Browse Source

melib/EnvelopeHashBatch: impl len method

tags/alpha-0.6.2
Manos Pitsidianakis 2 months ago
parent
commit
92b25de34e
Signed by: epilys GPG Key ID: 73627C2F690DF710
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      melib/src/backends.rs

+ 5
- 1
melib/src/backends.rs View File

@ -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