Conversation
|
r? @Manishearth (rust-highfive has picked a reviewer for you, use r? to override) |
08d4f34 to
c6feb9b
Compare
|
@giraffate Woudl you like to review this PR? No worries if you can't. |
|
@Manishearth Yes, I'll do it. ( I think it will take a couple of days until first review, since the diff is so large. ) |
|
Totally fair, and feel free to pass it back to me if you need r? @giraffate |
|
✌️ @giraffate can now approve this pull request |
f36a1fd to
e3cd56a
Compare
|
☔ The latest upstream changes (presumably #6971) made this pull request unmergeable. Please resolve the merge conflicts. |
giraffate
left a comment
There was a problem hiding this comment.
Sorry, I'm in the middle of review, but I made some review on this.
2458362 to
0bfc9c9
Compare
|
☔ The latest upstream changes (presumably #6931) made this pull request unmergeable. Please resolve the merge conflicts. |
0bfc9c9 to
9ac6111
Compare
|
☔ The latest upstream changes (presumably #7043) made this pull request unmergeable. Please resolve the merge conflicts. |
9ac6111 to
de18142
Compare
|
☔ The latest upstream changes (presumably #7047) made this pull request unmergeable. Please resolve the merge conflicts. |
|
@Jarcho I'm still reviewing this and will finish in the next 24 hours. |
|
@Y-Nak Thanks for your review! Nice catches! |
762651b to
a0c4eca
Compare
There was a problem hiding this comment.
I finished the review and added some comments.
@giraffate Could you have a final look?
ff78dd4 to
12e96e8
Compare
Fix false positives where the map is used before inserting into the map. Fix false positives where two insertions happen. Suggest using `if let Entry::Vacant(e) = _.entry(_)` when `or_insert` might be a semantic change
Lint `if _.[!]contains_key(&_) { .. } else { .. }` so long as one of the branches contains an insertion.
Suggest using `or_insert_with` when possible
12e96e8 to
bcf3488
Compare
|
No worries. It's a big change. |
giraffate
left a comment
There was a problem hiding this comment.
It looks good to me, thanks for your work!
|
@bors r+ |
|
📌 Commit bcf3488 has been approved by |
|
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
fixes: #5176
fixes: #4674
fixes: #4664
fixes: #1450
Still need to handle the value returned by
insertcorrectly.changelog: Improve
map_entrysuggestion. Will now suggestor_insert,insert_withormatch _.entry(_)as appopriate.changelog: Fix
map_entryfalse positives where the entry api can't be used. e.g. when the map is used for multiple things.