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