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:20:5
14 LL | / if !m.contains_key(&k) {
16 LL | | m.insert(k, v);
18 LL | | m.insert(k, v2);
25 LL | if let std::collections::hash_map::Entry::Vacant(e) = m.entry(k) {
33 error: usage of `contains_key` followed by `insert` on a `HashMap`
34 --> $DIR/entry.rs:28:5
36 LL | / if !m.contains_key(&k) {
38 LL | | m.insert(k, v);
47 LL | if let std::collections::hash_map::Entry::Vacant(e) = m.entry(k) {
55 error: usage of `contains_key` followed by `insert` on a `HashMap`
56 --> $DIR/entry.rs:37:5
58 LL | / if !m.contains_key(&k) {
60 LL | | m.insert(k, v);
66 LL | if let std::collections::hash_map::Entry::Vacant(e) = m.entry(k) {
72 error: usage of `contains_key` followed by `insert` on a `HashMap`
73 --> $DIR/entry.rs:42:5
75 LL | / if !m.contains_key(&k) {
78 LL | | m.insert(k, v);
86 LL | if let std::collections::hash_map::Entry::Vacant(e) = m.entry(k) {
94 error: usage of `contains_key` followed by `insert` on a `HashMap`
95 --> $DIR/entry.rs:53:5
97 LL | / if !m.contains_key(&k) {
108 LL | if let std::collections::hash_map::Entry::Vacant(e) = m.entry(k) {
116 error: usage of `contains_key` followed by `insert` on a `HashMap`
117 --> $DIR/entry.rs:65:5
119 LL | / if !m.contains_key(&k) {
122 LL | | 0 if false => {
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:91:5
141 LL | / if !m.contains_key(&m!(k)) {
142 LL | | m.insert(m!(k), m!(v));
148 LL | if let std::collections::hash_map::Entry::Vacant(e) = m.entry(m!(k)) {
149 LL | e.insert(m!(v));
153 error: usage of `contains_key` followed by `insert` on a `BTreeMap`
154 --> $DIR/entry.rs:97:5
156 LL | / if !m.contains_key(&k) {
157 LL | | m.insert(k, v);
164 LL | if let std::collections::btree_map::Entry::Vacant(e) = m.entry(k) {
170 error: aborting due to 9 previous errors