bitmaps icon indicating copy to clipboard operation
bitmaps copied to clipboard

BUG: iterator out of range

Open gwy15 opened this issue 2 years ago • 1 comments

The following test failes for the last assert. The iterator yields 0,1,2,3 which is out of range.

#[test]
fn iterate_in_range() {
    let mut m = bitmaps::Bitmap::<3>::new();
    m.invert();
    let mut iter = m.into_iter();
    assert_eq!(iter.next(), Some(0));
    assert_eq!(iter.next(), Some(1));
    assert_eq!(iter.next(), Some(2));
    // assert_eq!(iter.next(), Some(3));
    assert_eq!(iter.next(), None);
}

gwy15 avatar Feb 08 '23 10:02 gwy15

duplicate of #18, which was created 4 months ago. Version 3.0.0 and 3.1.0 both reproduce this bug.

gwy15 avatar Feb 08 '23 10:02 gwy15