1 error: usage of `contains_key` followed by `insert` on a `HashMap`
4 13 | if !m.contains_key(&k) { m.insert(k, v); }
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `m.entry(k).or_insert(v)`
7 = note: `-D map-entry` implied by `-D warnings`
9 error: usage of `contains_key` followed by `insert` on a `HashMap`
12 17 | if !m.contains_key(&k) { foo(); m.insert(k, v); }
13 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `m.entry(k)`
15 = note: `-D map-entry` implied by `-D warnings`
17 error: usage of `contains_key` followed by `insert` on a `HashMap`
20 21 | if !m.contains_key(&k) { m.insert(k, v) } else { None };
21 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `m.entry(k)`
23 = note: `-D map-entry` implied by `-D warnings`
25 error: usage of `contains_key` followed by `insert` on a `HashMap`
28 25 | if m.contains_key(&k) { None } else { m.insert(k, v) };
29 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `m.entry(k)`
31 = note: `-D map-entry` implied by `-D warnings`
33 error: usage of `contains_key` followed by `insert` on a `HashMap`
36 29 | if !m.contains_key(&k) { foo(); m.insert(k, v) } else { None };
37 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `m.entry(k)`
39 = note: `-D map-entry` implied by `-D warnings`
41 error: usage of `contains_key` followed by `insert` on a `HashMap`
44 33 | if m.contains_key(&k) { None } else { foo(); m.insert(k, v) };
45 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `m.entry(k)`
47 = note: `-D map-entry` implied by `-D warnings`
49 error: usage of `contains_key` followed by `insert` on a `BTreeMap`
52 37 | if !m.contains_key(&k) { foo(); m.insert(k, v) } else { None };
53 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `m.entry(k)`
55 = note: `-D map-entry` implied by `-D warnings`
57 error: aborting due to previous error(s)
60 To learn more, run the command again with --verbose.