Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: