fn cleanup_item_list(item_list: &mut Vec<String>, removed_items: &HashSet<String>) {
    let mut new_list = Vec::<String>::new();
    std::mem::swap(item_list, &mut new_list);

    for item in new_list {
        if removed_items.get(&item).is_none() {
            item_list.push(item);
        }
    }
}
// remove the identifiers in removed_items from the item_list
remove the identifiers in removed_items from the item_list
remove the identifiers in removed_items from the item_list
fn cleanup_item_list(item_list: &mut Vec<String>, removed_items: &HashSet<String>) {
    let mut new_list = Vec::<String>::new();
    std::mem::swap(item_list, &mut new_list);
    for item in new_list {
        if removed_items.get(&item).is_none() {
            item_list.push(item);
        }
    }
}
fn cleanup_item_list ( item_list : & mut Vec < String > , removed_items : & HashSet < String > ) { let mut new_list = Vec :: < String > :: new ( ) ; std :: mem :: swap ( item_list , & mut new_list ) ; for item in new_list { if removed_items . get ( & item ) . is_none ( ) { item_list . push ( item ) ; } } }
remove the identifiers in removed_items from the item_list
remove the identifiers in removed_items from the item_list
item_list
&mut Vec<String>
removed_items
&HashSet<String>