2017-02-07 21:05:30 +01:00
|
|
|
error: usage of `contains_key` followed by `insert` on a `HashMap`
|
2017-05-17 17:51:35 +02:00
|
|
|
--> entry.rs:13:5
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
|
|
|
13 | if !m.contains_key(&k) { m.insert(k, v); }
|
2017-05-03 12:51:47 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `m.entry(k).or_insert(v)`
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
2017-05-17 14:19:44 +02:00
|
|
|
= note: `-D map-entry` implied by `-D warnings`
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
|
|
error: usage of `contains_key` followed by `insert` on a `HashMap`
|
2017-05-17 17:51:35 +02:00
|
|
|
--> entry.rs:17:5
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
2017-05-11 13:03:39 +02:00
|
|
|
17 | if !m.contains_key(&k) { foo(); m.insert(k, v); }
|
2017-05-03 12:51:47 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `m.entry(k)`
|
2017-05-17 14:19:44 +02:00
|
|
|
|
|
|
|
|
= note: `-D map-entry` implied by `-D warnings`
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
|
|
error: usage of `contains_key` followed by `insert` on a `HashMap`
|
2017-05-17 17:51:35 +02:00
|
|
|
--> entry.rs:21:5
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
2017-05-11 13:03:39 +02:00
|
|
|
21 | if !m.contains_key(&k) { m.insert(k, v) } else { None };
|
2017-05-03 12:51:47 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `m.entry(k)`
|
2017-05-17 14:19:44 +02:00
|
|
|
|
|
|
|
|
= note: `-D map-entry` implied by `-D warnings`
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
|
|
error: usage of `contains_key` followed by `insert` on a `HashMap`
|
2017-05-17 17:51:35 +02:00
|
|
|
--> entry.rs:25:5
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
2017-05-11 13:03:39 +02:00
|
|
|
25 | if m.contains_key(&k) { None } else { m.insert(k, v) };
|
2017-05-03 12:51:47 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `m.entry(k)`
|
2017-05-17 14:19:44 +02:00
|
|
|
|
|
|
|
|
= note: `-D map-entry` implied by `-D warnings`
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
|
|
error: usage of `contains_key` followed by `insert` on a `HashMap`
|
2017-05-17 17:51:35 +02:00
|
|
|
--> entry.rs:29:5
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
2017-05-11 13:03:39 +02:00
|
|
|
29 | if !m.contains_key(&k) { foo(); m.insert(k, v) } else { None };
|
2017-05-03 12:51:47 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `m.entry(k)`
|
2017-05-17 14:19:44 +02:00
|
|
|
|
|
|
|
|
= note: `-D map-entry` implied by `-D warnings`
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
|
|
error: usage of `contains_key` followed by `insert` on a `HashMap`
|
2017-05-17 17:51:35 +02:00
|
|
|
--> entry.rs:33:5
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
2017-05-11 13:03:39 +02:00
|
|
|
33 | if m.contains_key(&k) { None } else { foo(); m.insert(k, v) };
|
2017-05-03 12:51:47 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `m.entry(k)`
|
2017-05-17 14:19:44 +02:00
|
|
|
|
|
|
|
|
= note: `-D map-entry` implied by `-D warnings`
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
|
|
error: usage of `contains_key` followed by `insert` on a `BTreeMap`
|
2017-05-17 17:51:35 +02:00
|
|
|
--> entry.rs:37:5
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
2017-05-11 13:03:39 +02:00
|
|
|
37 | if !m.contains_key(&k) { foo(); m.insert(k, v) } else { None };
|
2017-05-03 12:51:47 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `m.entry(k)`
|
2017-05-17 14:19:44 +02:00
|
|
|
|
|
|
|
|
= note: `-D map-entry` implied by `-D warnings`
|
2017-02-07 21:05:30 +01:00
|
|
|
|
2017-05-26 09:21:54 +02:00
|
|
|
error: aborting due to previous error(s)
|
2017-02-07 21:05:30 +01:00
|
|
|
|
2017-05-17 14:19:44 +02:00
|
|
|
|
|
|
|
To learn more, run the command again with --verbose.
|