Skip to content

Commit 9af4366

Browse files
committed
Implement the bitmap run intersect_with operation
1 parent 0a66483 commit 9af4366

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/bitmap/store.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -512,8 +512,10 @@ impl Store {
512512
new.intersect_with(this);
513513
*this = new;
514514
}
515-
// TODO(jpg) intersect_with bitmap, run
516-
(_this @ &mut Bitmap(..), &Run(..)) => unimplemented!(),
515+
(this @ &mut Bitmap(..), &Run(..)) => {
516+
let other = other.to_bitmap();
517+
this.intersect_with(&other);
518+
}
517519
(&mut Run(ref mut intervals1), &Run(ref intervals2)) => {
518520
let mut merged = Vec::new();
519521

0 commit comments

Comments
 (0)