mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 17:53:56 +00:00
13 lines
351 B
Plaintext
13 lines
351 B
Plaintext
error: usage of `contains_key` followed by `insert` on a `HashMap`
|
|
--> $DIR/entry_fixable.rs:12:5
|
|
|
|
|
LL | / if !m.contains_key(&k) {
|
|
LL | | m.insert(k, v);
|
|
LL | | }
|
|
| |_____^ help: consider using: `m.entry(k).or_insert(v);`
|
|
|
|
|
= note: `-D clippy::map-entry` implied by `-D warnings`
|
|
|
|
error: aborting due to previous error
|
|
|