usestd::collections::BTreeMap;
usestd::collections::btree_map::Entry;
letmutmap: BTreeMap<&str, usize>=BTreeMap::new();
map.entry("poneyland").or_insert(12);
ifletEntry::Occupied(o) =map.entry("poneyland") {
// We delete the entry from the map.o.remove_entry();
}
// If now try to get the value, it will panic:// println!("{}", map["poneyland"]);