diff options
| author | dylni <46035563+dylni@users.noreply.github.com> | 2020-09-18 12:17:51 -0400 |
|---|---|---|
| committer | dylni <46035563+dylni@users.noreply.github.com> | 2020-09-18 12:17:51 -0400 |
| commit | 1ff7da6551a7cdf6ace2a9d00e92bbab550334ee (patch) | |
| tree | 83dfb35cedd5a32e6044bfb12c03d38a907b5b00 /library/alloc/src/vec.rs | |
| parent | 2c69266c0697b0c0b34abea62cba1a1d3c59c90c (diff) | |
| download | rust-1ff7da6551a7cdf6ace2a9d00e92bbab550334ee.tar.gz rust-1ff7da6551a7cdf6ace2a9d00e92bbab550334ee.zip | |
Move `slice::check_range` to `RangeBounds`
Diffstat (limited to 'library/alloc/src/vec.rs')
| -rw-r--r-- | library/alloc/src/vec.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/alloc/src/vec.rs b/library/alloc/src/vec.rs index 9dbea0dc9e6..e668b17c46c 100644 --- a/library/alloc/src/vec.rs +++ b/library/alloc/src/vec.rs @@ -1312,7 +1312,7 @@ impl<T> Vec<T> { // the hole, and the vector length is restored to the new length. // let len = self.len(); - let Range { start, end } = slice::check_range(len, range); + let Range { start, end } = range.for_length(len); unsafe { // set self.vec length's to start, to be safe in case Drain is leaked |
