BTreeMap: lightly refactor range_search#81331
BTreeMap: lightly refactor range_search#81331ssomers wants to merge 1 commit intorust-lang:masterfrom ssomers:btree_drainy_refactor_5
Conversation
There was a problem hiding this comment.
Can we place a comment on what the meaning of Some/None here is?
There was a problem hiding this comment.
How about a commented type?
@rustbot modify labels: -S-waiting-on-author +S-waiting-on-review
|
Looking a bit more at this, I am struggling with seeing this as an improvement. It seems like the encoding of the bit true/false into the Option makes it less clear what the code is doing rather than more by combining the paths for initial unbounded with "became unbounded" in a way that's confusing to me at least. Maybe we can find a different structure that works well? Maybe noting on the various branches why first/last/left/right edges are chosen would also help with making the intent clear, right now I at least have a bit of a hard time justifying without some manual working out why they're being made. |
|
I can only repeat I think it's slightly better in itself and that #81094 is the next step, which splits this large function up, and is also necessary for the |
|
The only thing I can think of that doesn/t thwart #81094 is the definition of |
|
Can't keep updating this preparation of a preparation |
Ramp up to #81094 but IMHO useful in itself.
r? @Mark-Simulacrum