Auto merge of #97868 - ssomers:btree_from_sorted_iter, r=the8472
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.
Showing
想要评论请 注册 或 登录