Skip to content

Commit

Permalink
Get rid of drain_filter
Browse files Browse the repository at this point in the history
It seems it was removed from nightly
  • Loading branch information
matzipan committed Jul 4, 2023
1 parent 1b58291 commit d13d19c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![feature(hash_drain_filter)]

#[macro_use]
extern crate serde_derive;

Expand Down
4 changes: 2 additions & 2 deletions src/services/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -412,8 +412,8 @@ impl Store {
);

let ids_not_on_server: Vec<_> = store_folder_uids
// We use drain_filter to avoid an extra copy to gain ownership
.drain_filter(|uid, _| !server_uid_set.contains(&(*uid as u32)))
.into_iter()
.filter(|(uid, _)| !server_uid_set.contains(&(*uid as u32)))
.map(|(_, id)| id)
.collect();

Expand Down

0 comments on commit d13d19c

Please sign in to comment.