Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BTreeMap: correct way to postpone root access in DrainFilter #75487

Closed
wants to merge 1 commit into from

Conversation

ssomers
Copy link
Contributor

@ssomers ssomers commented Aug 13, 2020

The DrainFilter iterator no longer removed empty internal roots, because the cur_leaf_edge in the drop handler did not contain an edge (except after panic in drop). And it only tried to remove a single internal root, while a huge tree can be drained down to any height.

This fixes that problem, but not if someone mem::forgets the iterator. It's more a proof of concept than lunch, while the real food is still cooking on the test machine.

r? @Mark-Simulacrum

@ssomers ssomers closed this Aug 14, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 15, 2020
…mulacrum

Revert the fundamental changes in rust-lang#74762 and rust-lang#75257

Before possibly going over to rust-lang#75487. Also contains some added and fixed comments.

r? @Mark-Simulacrum
@ssomers ssomers deleted the btree_fix_75257_standalone branch September 19, 2020 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant