1 error: usage of `contains_key` followed by `insert` on a `HashMap`
4 LL | / if !m.contains_key(&k) {
7 | |_____^ help: try this: `m.entry(k).or_insert(v);`
9 = note: `-D clippy::map-entry` implied by `-D warnings`
11 error: usage of `contains_key` followed by `insert` on a `HashMap`
12 --> $DIR/entry.rs:29:5
14 LL | / if !m.contains_key(&k) {
16 LL | | m.insert(k, v);
18 LL | | m.insert(k, v2);
25 LL | m.entry(k).or_insert_with(|| {
33 error: usage of `contains_key` followed by `insert` on a `HashMap`
34 --> $DIR/entry.rs:38:5
36 LL | / if !m.contains_key(&k) {
40 LL | | m.insert(k, v2)
47 LL | m.entry(k).or_insert_with(|| {
55 error: usage of `contains_key` followed by `insert` on a `HashMap`
56 --> $DIR/entry.rs:47:5
58 LL | / if !m.contains_key(&k) {
60 LL | | m.insert(k, v);
69 LL | if let std::collections::hash_map::Entry::Vacant(e) = m.entry(k) {
77 error: usage of `contains_key` followed by `insert` on a `HashMap`
78 --> $DIR/entry.rs:57:5
80 LL | / if !m.contains_key(&k) {
82 LL | | m.insert(k, v);
88 LL | m.entry(k).or_insert_with(|| {
94 error: usage of `contains_key` followed by `insert` on a `HashMap`
95 --> $DIR/entry.rs:63:5
97 LL | / if !m.contains_key(&k) {
100 LL | | m.insert(k, v);
108 LL | m.entry(k).or_insert_with(|| {
116 error: usage of `contains_key` followed by `insert` on a `HashMap`
117 --> $DIR/entry.rs:75:5
119 LL | / if !m.contains_key(&k) {
130 LL | if let std::collections::hash_map::Entry::Vacant(e) = m.entry(k) {
138 error: usage of `contains_key` followed by `insert` on a `HashMap`
139 --> $DIR/entry.rs:85:5
141 LL | / if !m.contains_key(&k) {
144 LL | | 0 if false => {
152 LL | m.entry(k).or_insert_with(|| {
160 error: usage of `contains_key` followed by `insert` on a `HashMap`
161 --> $DIR/entry.rs:119:5
163 LL | / if !m.contains_key(&m!(k)) {
164 LL | | m.insert(m!(k), m!(v));
166 | |_____^ help: try this: `m.entry(m!(k)).or_insert_with(|| m!(v));`
168 error: usage of `contains_key` followed by `insert` on a `BTreeMap`
169 --> $DIR/entry.rs:153:5
171 LL | / if !m.contains_key(&k) {
172 LL | | m.insert(k, v);
179 LL | if let std::collections::btree_map::Entry::Vacant(e) = m.entry(k) {
185 error: aborting due to 10 previous errors