Skip to content

Conversation

@ssomers
Copy link
Contributor

@ssomers ssomers commented Jan 16, 2021

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 #81075. It also moves those functions over to the search module.

r? @Mark-Simulacrum

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 16, 2021
@ssomers
Copy link
Contributor Author

ssomers commented Jan 17, 2021

Just noticed that my fancy description applies to code in a parallel universe, and this one isn't quite as elegant.

@ssomers ssomers marked this pull request as draft January 17, 2021 20:18
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 18, 2021
…Simulacrum

BTreeMap: convert search functions to methods

And further tweak the signature of `search_linear`, in preparation of a better rust-lang#81094.

r? `@Mark-Simulacrum`
@Mark-Simulacrum Mark-Simulacrum added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 18, 2021
@ssomers ssomers marked this pull request as ready for review January 18, 2021 21:05
@ssomers
Copy link
Contributor Author

ssomers commented Jan 18, 2021

@rustbot modify labels: -S-waiting-on-author +S-waiting-on-review

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 18, 2021
@bors
Copy link
Collaborator

bors commented Jan 19, 2021

☔ The latest upstream changes (presumably #81169) made this pull request unmergeable. Please resolve the merge conflicts.

@ssomers
Copy link
Contributor Author

ssomers commented Jan 24, 2021

Splitting off more parts as separate PRs while merge conflicts come in.

@ssomers ssomers marked this pull request as draft January 24, 2021 11:54
@Mark-Simulacrum Mark-Simulacrum added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 24, 2021
@bors
Copy link
Collaborator

bors commented Jan 29, 2021

☔ The latest upstream changes (presumably #81073) made this pull request unmergeable. Please resolve the merge conflicts.

@bors
Copy link
Collaborator

bors commented Feb 7, 2021

☔ The latest upstream changes (presumably #81853) made this pull request unmergeable. Please resolve the merge conflicts.

@bors
Copy link
Collaborator

bors commented Feb 15, 2021

☔ The latest upstream changes (presumably #82103) made this pull request unmergeable. Please resolve the merge conflicts.

@bors
Copy link
Collaborator

bors commented Feb 23, 2021

☔ The latest upstream changes (presumably #81937) made this pull request unmergeable. Please resolve the merge conflicts.

@ssomers
Copy link
Contributor Author

ssomers commented Feb 23, 2021

@rustbot modify labels: -S-waiting-on-author +S-waiting-on-review

@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Feb 23, 2021
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 23, 2021
@Mark-Simulacrum
Copy link
Member

This looks good to me, thanks. @bors r+ rollup=never

@bors
Copy link
Collaborator

bors commented Mar 1, 2021

📌 Commit deebb63 has been approved by Mark-Simulacrum

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 1, 2021
@bors
Copy link
Collaborator

bors commented Mar 1, 2021

⌛ Testing commit deebb63 with merge 3b150b7...

@bors
Copy link
Collaborator

bors commented Mar 1, 2021

☀️ Test successful - checks-actions
Approved by: Mark-Simulacrum
Pushing 3b150b7 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 1, 2021
@bors bors merged commit 3b150b7 into rust-lang:master Mar 1, 2021
@rustbot rustbot added this to the 1.52.0 milestone Mar 1, 2021
@ssomers ssomers deleted the btree_drainy_refactor_3 branch March 1, 2021 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants