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(|| {
34 error: usage of `contains_key` followed by `insert` on a `HashMap`
35 --> $DIR/entry.rs:38:5
37 LL | / if !m.contains_key(&k) {
41 LL | | m.insert(k, v2)
48 LL ~ m.entry(k).or_insert_with(|| {
57 error: usage of `contains_key` followed by `insert` on a `HashMap`
58 --> $DIR/entry.rs:47:5
60 LL | / if !m.contains_key(&k) {
62 LL | | m.insert(k, v);
71 LL ~ if let std::collections::hash_map::Entry::Vacant(e) = m.entry(k) {
81 error: usage of `contains_key` followed by `insert` on a `HashMap`
82 --> $DIR/entry.rs:57:5
84 LL | / if !m.contains_key(&k) {
86 LL | | m.insert(k, v);
92 LL ~ m.entry(k).or_insert_with(|| {
98 error: usage of `contains_key` followed by `insert` on a `HashMap`
99 --> $DIR/entry.rs:63:5
101 LL | / if !m.contains_key(&k) {
103 LL | | 1 if true => {
104 LL | | m.insert(k, v);
112 LL ~ m.entry(k).or_insert_with(|| {
124 error: usage of `contains_key` followed by `insert` on a `HashMap`
125 --> $DIR/entry.rs:75:5
127 LL | / if !m.contains_key(&k) {
138 LL ~ if let std::collections::hash_map::Entry::Vacant(e) = m.entry(k) {
148 error: usage of `contains_key` followed by `insert` on a `HashMap`
149 --> $DIR/entry.rs:85:5
151 LL | / if !m.contains_key(&k) {
154 LL | | 0 if false => {
162 LL ~ m.entry(k).or_insert_with(|| {
189 error: usage of `contains_key` followed by `insert` on a `HashMap`
190 --> $DIR/entry.rs:119:5
192 LL | / if !m.contains_key(&m!(k)) {
193 LL | | m.insert(m!(k), m!(v));
195 | |_____^ help: try this: `m.entry(m!(k)).or_insert_with(|| m!(v));`
197 error: usage of `contains_key` followed by `insert` on a `HashMap`
198 --> $DIR/entry.rs:151:5
200 LL | / if !m.contains_key(&k) {
201 LL | | let x = (String::new(), String::new());
203 LL | | m.insert(k, v);
209 LL ~ m.entry(k).or_insert_with(|| {
210 LL + let x = (String::new(), String::new());
216 error: aborting due to 10 previous errors