2019-09-25 13:31:46 +02:00
|
|
|
error: usage of `contains_key` followed by `insert` on a `HashMap`
|
2019-09-25 13:38:17 +02:00
|
|
|
--> $DIR/entry_fixable.rs:12:5
|
2019-09-25 13:31:46 +02:00
|
|
|
|
|
|
|
|
LL | / if !m.contains_key(&k) {
|
|
|
|
LL | | m.insert(k, v);
|
|
|
|
LL | | }
|
2019-09-25 13:38:17 +02:00
|
|
|
| |_____^ help: consider using: `m.entry(k).or_insert(v);`
|
2019-09-25 13:31:46 +02:00
|
|
|
|
|
|
|
|
= note: `-D clippy::map-entry` implied by `-D warnings`
|
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|