mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-02 15:32:06 +00:00
5878780e64
BTree: remove Ord bound from new `K: Ord` bound is unnecessary on `BTree{Map,Set}::new` and their `Default` impl. No elements exist so there are nothing to compare anyway, so I don't think "future proof" would be a blocker here. This is analogous to `HashMap::new` not having a `K: Eq + Hash` bound. #79245 originally does this and for some reason drops the change to `new` and `Default`. I can see why changes to other methods like `entry` or `symmetric_difference` need to be careful but I couldn't find out any reason not to do it on `new`. Removing the bound also makes the stabilisation of `const fn new` not depending on const trait bounds. cc `@steffahn` who suggests me to make this PR. r? `@dtolnay` |
||
---|---|---|
.. | ||
alloc | ||
collections | ||
prelude | ||
raw_vec | ||
rc | ||
sync | ||
vec | ||
alloc.rs | ||
borrow.rs | ||
boxed.rs | ||
fmt.rs | ||
lib.rs | ||
macros.rs | ||
raw_vec.rs | ||
rc.rs | ||
slice.rs | ||
str.rs | ||
string.rs | ||
sync.rs | ||
task.rs | ||
tests.rs |