From 9af436678706efc495d543a71a5ccd9fd70f11a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Sat, 12 Sep 2020 11:33:12 +0200 Subject: [PATCH] Implement the bitmap run intersect_with operation --- src/bitmap/store.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/bitmap/store.rs b/src/bitmap/store.rs index 6ad93793..515b7889 100644 --- a/src/bitmap/store.rs +++ b/src/bitmap/store.rs @@ -512,8 +512,10 @@ impl Store { new.intersect_with(this); *this = new; } - // TODO(jpg) intersect_with bitmap, run - (_this @ &mut Bitmap(..), &Run(..)) => unimplemented!(), + (this @ &mut Bitmap(..), &Run(..)) => { + let other = other.to_bitmap(); + this.intersect_with(&other); + } (&mut Run(ref mut intervals1), &Run(ref intervals2)) => { let mut merged = Vec::new();