1 error: usage of `contains_key` followed by `insert` on a `HashMap`
2 --> $DIR/entry_with_else.rs:16:5
4 LL | / if !m.contains_key(&k) {
7 LL | | m.insert(k, v2);
11 = note: `-D clippy::map-entry` implied by `-D warnings`
14 LL ~ match m.entry(k) {
15 LL + std::collections::hash_map::Entry::Vacant(e) => {
18 LL + std::collections::hash_map::Entry::Occupied(mut e) => {
22 error: usage of `contains_key` followed by `insert` on a `HashMap`
23 --> $DIR/entry_with_else.rs:22:5
25 LL | / if m.contains_key(&k) {
26 LL | | m.insert(k, v);
28 LL | | m.insert(k, v2);
34 LL ~ match m.entry(k) {
35 LL + std::collections::hash_map::Entry::Occupied(mut e) => {
38 LL + std::collections::hash_map::Entry::Vacant(e) => {
42 error: usage of `contains_key` followed by `insert` on a `HashMap`
43 --> $DIR/entry_with_else.rs:28:5
45 LL | / if !m.contains_key(&k) {
46 LL | | m.insert(k, v);
54 LL ~ if let std::collections::hash_map::Entry::Vacant(e) = m.entry(k) {
61 error: usage of `contains_key` followed by `insert` on a `HashMap`
62 --> $DIR/entry_with_else.rs:34:5
64 LL | / if !m.contains_key(&k) {
67 LL | | m.insert(k, v);
73 LL ~ if let std::collections::hash_map::Entry::Occupied(mut e) = m.entry(k) {
80 error: usage of `contains_key` followed by `insert` on a `HashMap`
81 --> $DIR/entry_with_else.rs:40:5
83 LL | / if !m.contains_key(&k) {
84 LL | | m.insert(k, v);
86 LL | | m.insert(k, v2);
92 LL ~ match m.entry(k) {
93 LL + std::collections::hash_map::Entry::Vacant(e) => {
96 LL + std::collections::hash_map::Entry::Occupied(mut e) => {
100 error: usage of `contains_key` followed by `insert` on a `HashMap`
101 --> $DIR/entry_with_else.rs:46:5
103 LL | / if m.contains_key(&k) {
104 LL | | if true { m.insert(k, v) } else { m.insert(k, v2) }
106 LL | | m.insert(k, v)
112 LL ~ match m.entry(k) {
113 LL + std::collections::hash_map::Entry::Occupied(mut e) => {
114 LL + if true { Some(e.insert(v)) } else { Some(e.insert(v2)) }
116 LL + std::collections::hash_map::Entry::Vacant(e) => {
120 error: usage of `contains_key` followed by `insert` on a `HashMap`
121 --> $DIR/entry_with_else.rs:52:5
123 LL | / if m.contains_key(&k) {
125 LL | | m.insert(k, v)
133 LL ~ if let std::collections::hash_map::Entry::Occupied(mut e) = m.entry(k) {
135 LL + Some(e.insert(v))
141 error: aborting due to 7 previous errors