Anders429 / Anders429/nested_containment_list

Separate out custom binary search

Aperta
#24 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
good first issue
Lingua principale
Rust
Stelle
3
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

The binary search done in `next()` and `next_back()` is basically just a regular `slice::binary_search_by` with added access to the current index in the function. The two code chunks are nearly identical and can be separate out into a separate `enumerated_binary_search_by()` method.

This could either be a helper method in this crate or a separate crate on its own. That depends on whether we think people will use it in other contexts, I suppose.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.