2017-02-07 20:05:30 +00:00
|
|
|
error: usage of `contains_key` followed by `insert` on a `HashMap`
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/entry.rs:23:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
23 | if !m.contains_key(&k) { m.insert(k, v); }
|
2017-07-21 08:40:23 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `m.entry(k).or_insert(v)`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-08-01 14:30:44 +00:00
|
|
|
= note: `-D clippy::map-entry` implied by `-D warnings`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: usage of `contains_key` followed by `insert` on a `HashMap`
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/entry.rs:27:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
27 | if !m.contains_key(&k) { foo(); m.insert(k, v); }
|
2017-07-21 08:40:23 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `m.entry(k)`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: usage of `contains_key` followed by `insert` on a `HashMap`
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/entry.rs:31:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
31 | if !m.contains_key(&k) { m.insert(k, v) } else { None };
|
2017-07-21 08:40:23 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `m.entry(k)`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: usage of `contains_key` followed by `insert` on a `HashMap`
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/entry.rs:35:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
35 | if m.contains_key(&k) { None } else { m.insert(k, v) };
|
2017-07-21 08:40:23 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `m.entry(k)`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: usage of `contains_key` followed by `insert` on a `HashMap`
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/entry.rs:39:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
39 | if !m.contains_key(&k) { foo(); m.insert(k, v) } else { None };
|
2017-07-21 08:40:23 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `m.entry(k)`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: usage of `contains_key` followed by `insert` on a `HashMap`
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/entry.rs:43:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
43 | if m.contains_key(&k) { None } else { foo(); m.insert(k, v) };
|
2017-07-21 08:40:23 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `m.entry(k)`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: usage of `contains_key` followed by `insert` on a `BTreeMap`
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/entry.rs:47:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
47 | if !m.contains_key(&k) { foo(); m.insert(k, v) } else { None };
|
2017-07-21 08:40:23 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `m.entry(k)`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
2018-01-16 16:06:27 +00:00
|
|
|
error: aborting due to 7 previous errors
|
|
|
|
|