Commit 4278b5f
committed
Auto merge of #27545 - apasel422:btree-range, r=Gankro
This permits collections with `String` keys to be ranged over with
`&str` bounds. The `K` defaults for `Min` and `Max` permit the default
type parameter fallback to work with things like
```rust
use std::collections::{BTreeSet, Bound};
let set = BTreeSet::<String>::new();
set.range(Bound::Included("a"), Bound::Unbounded);
```
Without the defaults, the type of the maximum bound would be
unconstrained.
r? @gankro3 files changed
+22
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1522 | 1522 | | |
1523 | 1523 | | |
1524 | 1524 | | |
1525 | | - | |
| 1525 | + | |
| 1526 | + | |
| 1527 | + | |
| 1528 | + | |
| 1529 | + | |
1526 | 1530 | | |
1527 | 1531 | | |
1528 | 1532 | | |
| |||
1542 | 1546 | | |
1543 | 1547 | | |
1544 | 1548 | | |
1545 | | - | |
| 1549 | + | |
1546 | 1550 | | |
1547 | 1551 | | |
1548 | 1552 | | |
| |||
1551 | 1555 | | |
1552 | 1556 | | |
1553 | 1557 | | |
1554 | | - | |
| 1558 | + | |
| 1559 | + | |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
1555 | 1563 | | |
1556 | 1564 | | |
1557 | 1565 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1528 | 1528 | | |
1529 | 1529 | | |
1530 | 1530 | | |
1531 | | - | |
| 1531 | + | |
| 1532 | + | |
| 1533 | + | |
1532 | 1534 | | |
1533 | 1535 | | |
1534 | 1536 | | |
| |||
1556 | 1558 | | |
1557 | 1559 | | |
1558 | 1560 | | |
1559 | | - | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
1560 | 1564 | | |
1561 | 1565 | | |
1562 | 1566 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
161 | | - | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
162 | 166 | | |
163 | 167 | | |
164 | 168 | | |
| |||
0 commit comments