BTree: add drain methods#81075
BTree: add drain methods#81075ssomers wants to merge 2 commits intorust-lang:masterfrom ssomers:btree_drain
Conversation
|
Is there a chance we can split this up into more commits? Reviewing a diff in a couple thousand lines is going to be quite challenging. It would be good to document any design decisions or otherwise guide my review, too. |
|
I can split off a few refactorings of existing functions, to open up for new use, but they seemed a bit pointless on their own (apart from one thing that I actually postponed). |
|
I don't really know what you postponed, but I will likely not be able to effectively review this diff without at least some guidance as to where to start or the overall vision in adding these methods. |
|
The item I postponed is that |
|
The overall vision in adding these methods is to not copy any existing functionality, but break it up in order to reuse parts. I'll feed those refactings in a few separate PRs now. |
|
☔ The latest upstream changes (presumably #81083) made this pull request unmergeable. Please resolve the merge conflicts. |
|
☔ The latest upstream changes (presumably #81169) made this pull request unmergeable. Please resolve the merge conflicts. |
|
☔ The latest upstream changes (presumably #81073) made this pull request unmergeable. Please resolve the merge conflicts. |
|
☔ The latest upstream changes (presumably #81361) made this pull request unmergeable. Please resolve the merge conflicts. |
|
☔ The latest upstream changes (presumably #81494) made this pull request unmergeable. Please resolve the merge conflicts. |
|
☔ The latest upstream changes (presumably #82103) made this pull request unmergeable. Please resolve the merge conflicts. |
|
☔ The latest upstream changes (presumably #82359) made this pull request unmergeable. Please resolve the merge conflicts. |
…rk-Simulacrum BTreeMap: gather and decompose reusable tree fixing functions This is kind of pushing it as a standalone refactor, probably only useful for rust-lang#81075 (or similar). r? `@Mark-Simulacrum`
|
☔ The latest upstream changes (presumably #81362) made this pull request unmergeable. Please resolve the merge conflicts. |
…rk-Simulacrum BTreeMap: split up range_search into two stages `range_search` expects the caller to pass the same root twice and starts searching a node for both bounds of a range. It's not very clear that in the early iterations, it searches twice in the same node. This PR splits that search up in an initial `find_leaf_edges_spanning_range` that postpones aliasing until the last second, and a second phase for continuing the search for the range in the each subtree independently (`find_lower_bound_edge` & `find_upper_bound_edge`), which greatly helps for use in rust-lang#81075. It also moves those functions over to the search module. r? `@Mark-Simulacrum`
|
@rustbot label: -S-waiting-on-author +S-waiting-on-review |
|
To stir up things, yanked the PS also formatted code with stable instead of nightly and did not test tidy like a good boy should |
This comment has been minimized.
This comment has been minimized.
|
☔ The latest upstream changes (presumably #94350) made this pull request unmergeable. Please resolve the merge conflicts. |
|
r? @yaahc |
|
r? rust-lang/libs-api |
|
r? rust-lang/libs-api |
|
☔ The latest upstream changes (presumably #98103) made this pull request unmergeable. Please resolve the merge conflicts. |
Implements #81074.
Builds on #93989.