Mercurial > lbo > hg > sstable
changeset 114:4523dab936ee
feat(SSIterator): add iterator impl for ssiterator trait
author | jasongoodwin <jay.michael.goodwin@gmail.com> |
---|---|
date | Tue, 28 Dec 2021 17:08:41 -0800 |
parents | 486244974475 |
children | 01f4273da035 |
files | src/types.rs |
diffstat | 1 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/types.rs Tue Nov 16 08:41:02 2021 +0100 +++ b/src/types.rs Tue Dec 28 17:08:41 2021 -0800 @@ -143,6 +143,15 @@ } } +// Allow interface to iterator. +impl Iterator for dyn SSIterator { + type Item = (Vec<u8>, Vec<u8>); + + fn next(&mut self) -> Option<Self::Item> { + self.next() + } +} + const MASK_DELTA: u32 = 0xa282ead8; pub fn mask_crc(c: u32) -> u32 {