Avoid slices where individuals are good enough#68451
Avoid slices where individuals are good enough#68451ssomers wants to merge 1 commit intorust-lang:masterfrom ssomers:slice_slasher
Conversation
|
r? @shepmaster (rust_highfive has picked a reviewer for you, use r? to override) |
|
This is (or will be, I suppose) beyond my knowledge :-) |
|
I've been doing review of the BTreeMap patches, so r? @Mark-Simulacrum |
|
It's definitely of much less use, priority and conviction than my other PRs (the useful parts have been merged in through other PRs). Not sure why github displays a "Ready for review" button on a draft PR, yet bothers reviewers from the start. PS oh right, it's assignee, not reviewer |
|
☔ The latest upstream changes (presumably #68659) made this pull request unmergeable. Please resolve the merge conflicts. |
|
When I rebase on a very recent master, which includes the |
As mentioned in #67686, slices on immutable trees are almost exclusively used to
get_uncheckeda particular item or position. The only exception happens through the (locally) publickeysfunction used only bysearch_linear.A step beyond is to not make slices on immutable trees at all, but pass in an index argument. This:
get_uncheckedand such themselves.keysas non-public, and tweakingsearch_linearjust like is done n this PR)ptr::copy_nonoverlappingcalls; but then again, the current implementation does the same just in time: it just assumes that the source slice and the destination slices are the same.