1
Fork 0

stabilize RangeBounds collections_range #30877

rename RangeBounds::start() -> start_bound()
rename RangeBounds::end() -> end_bound()
This commit is contained in:
Cory Sherman 2018-05-24 04:39:35 -07:00
parent b4463d788b
commit 1440f300d8
7 changed files with 68 additions and 100 deletions

View file

@ -1166,12 +1166,12 @@ impl<T> Vec<T> {
// the hole, and the vector length is restored to the new length.
//
let len = self.len();
let start = match range.start() {
let start = match range.start_bound() {
Included(&n) => n,
Excluded(&n) => n + 1,
Unbounded => 0,
};
let end = match range.end() {
let end = match range.end_bound() {
Included(&n) => n + 1,
Excluded(&n) => n,
Unbounded => len,