1
Fork 0

s/drain_filter/extract_if/ for Vec, Btree{Map,Set} and LinkedList

This commit is contained in:
The 8472 2023-04-09 00:37:21 +02:00
parent b7ce7edd87
commit 114d5f221c
31 changed files with 204 additions and 216 deletions

View file

@ -2494,7 +2494,7 @@ fn show_candidates(
for path_strings in [&mut accessible_path_strings, &mut inaccessible_path_strings] {
path_strings.sort_by(|a, b| a.0.cmp(&b.0));
let core_path_strings =
path_strings.drain_filter(|p| p.0.starts_with("core::")).collect::<Vec<_>>();
path_strings.extract_if(|p| p.0.starts_with("core::")).collect::<Vec<_>>();
path_strings.extend(core_path_strings);
path_strings.dedup_by(|a, b| a.0 == b.0);
}