3 ms·
I see! The big issue I've run into with BTreeMap is that you can't provide an external comparator. If comparisons only require data that the keys already have,
by sunshowers 1y ago
I see! The big issue I've run into with BTreeMap is that you can't provide an external comparator. If comparisons only require data that the keys already have, then the Reverse wrapper [1] has worked well for me.
[1] https://doc.rust-lang.org/std/cmp/struct.Reverse.html https://doc.rust-lang.org/std/cmp/struct.Reverse.html