Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
121: Make sure the `RetainMut::retain_mut` method is effectively used r=Kerollmops a=Kerollmops

This PR uses the fully qualified syntax to make sure that we use the `retain_mut` trait method of the `RetainMut` trait and not the one from the `vec_retain_mut` nighty feature [that will be added to the standard library](rust-lang/rust#90829) soon.

Co-authored-by: Clément Renault <clement@meilisearch.com>
  • Loading branch information
bors[bot] and Kerollmops authored Dec 13, 2021
2 parents 9f5df39 + bc1941b commit 678ad6b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/bitmap/ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ impl BitAndAssign<RoaringBitmap> for RoaringBitmap {
mem::swap(self, &mut rhs);
}

self.containers.retain_mut(|cont| {
RetainMut::retain_mut(&mut self.containers, |cont| {
let key = cont.key;
match rhs.containers.binary_search_by_key(&key, |c| c.key) {
Ok(loc) => {
Expand All @@ -312,7 +312,7 @@ impl BitAndAssign<RoaringBitmap> for RoaringBitmap {
impl BitAndAssign<&RoaringBitmap> for RoaringBitmap {
/// An `intersection` between two sets.
fn bitand_assign(&mut self, rhs: &RoaringBitmap) {
self.containers.retain_mut(|cont| {
RetainMut::retain_mut(&mut self.containers, |cont| {
let key = cont.key;
match rhs.containers.binary_search_by_key(&key, |c| c.key) {
Ok(loc) => {
Expand Down Expand Up @@ -389,7 +389,7 @@ impl SubAssign<RoaringBitmap> for RoaringBitmap {
impl SubAssign<&RoaringBitmap> for RoaringBitmap {
/// A `difference` between two sets.
fn sub_assign(&mut self, rhs: &RoaringBitmap) {
self.containers.retain_mut(|cont| {
RetainMut::retain_mut(&mut self.containers, |cont| {
match rhs.containers.binary_search_by_key(&cont.key, |c| c.key) {
Ok(loc) => {
SubAssign::sub_assign(cont, &rhs.containers[loc]);
Expand Down

0 comments on commit 678ad6b

Please sign in to comment.