mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-01 15:50:05 +03:00
be16c6166f
BTreeSet: avoid intermediate sorting when collecting sorted iterators As [pointed out by droundy](https://users.rust-lang.org/t/question-about-btreeset-implementation/76427), an obvious optimization is to skip the first step introduced by #88448 (creation of a vector and sorting) and it's easy to do so for btree's own iterators. Also, exploit `from` in the examples.