We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 95399a7 commit 699fb6dCopy full SHA for 699fb6d
1 file changed
roaring/src/bitmap/inherent.rs
@@ -400,15 +400,11 @@ impl RoaringBitmap {
400
pub fn remove(&mut self, value: u32) -> bool {
401
let (key, index) = util::split(value);
402
match self.containers.binary_search_by_key(&key, |c| c.key) {
403
- Ok(loc) => {
404
- if self.containers[loc].remove(index) {
405
- if self.containers[loc].is_empty() {
406
- self.containers.remove(loc);
407
- }
408
- true
409
- } else {
410
- false
+ Ok(loc) if self.containers[loc].remove(index) => {
+ if self.containers[loc].is_empty() {
+ self.containers.remove(loc);
411
}
+ true
412
413
_ => false,
414
0 commit comments