3 #![warn(clippy::map_entry)]
6 use std::collections::BTreeMap;
10 fn btree_map<K: Eq + Ord + Copy, V: Copy>(m: &mut BTreeMap<K, V>, k: K, v: V) {
11 // insert then do something, use if let
12 if let std::collections::btree_map::Entry::Vacant(e) = m.entry(k) {