More progress.

This commit is contained in:
2018-01-07 14:52:50 +01:00
parent 0a91d99044
commit 27eb6b2a2c
2 changed files with 9 additions and 1 deletions

View File

@@ -71,7 +71,7 @@ macro_rules! block_impl {
fn block<B>(value: Self) -> Self where B: Block { value / B::bits() as Self } fn block<B>(value: Self) -> Self where B: Block { value / B::bits() as Self }
#[inline] #[inline]
fn bit<B>(value: B) -> Self where B: Block { B::biter::<Self>(value) as Self } fn bit<B>(value: B) -> Self where B: Block { Self::from(B::biter::<Self>(value)) }
#[inline] #[inline]
fn biter<B>(value: Self) -> u8 where B: Block { (value % B::bits() as Self) as u8 } fn biter<B>(value: Self) -> u8 where B: Block { (value % B::bits() as Self) as u8 }

View File

@@ -247,6 +247,14 @@ impl<'a, T, B> ops::BitOr<&'a Self> for BitSet<T, B> where T: Block, B: Block {
self self
} }
} }
pub struct Iter<'a, T: 'a, B: 'a> {
iter: std::collections::hash_map::Iter<'a, T, B>,
block: T,
bits: B,
bit: B,
}
/* /*
pub struct Iter<'a> { pub struct Iter<'a> {
iter: std::collections::hash_map::Iter<'a, u64, u64>, iter: std::collections::hash_map::Iter<'a, u64, u64>,