Update comments
This commit is contained in:
parent
2db05f04be
commit
45bdf9cbee
1 changed files with 2 additions and 2 deletions
|
@ -1532,7 +1532,7 @@ impl<T, I> Index<I> for Vec<T> where [T]: Index<I> {
|
|||
|
||||
#[inline]
|
||||
fn index(&self, index: I) -> &Self::Output {
|
||||
// NB built-in indexing via `&[T]`
|
||||
// NB indexing via implementation on slice
|
||||
&(**self)[index]
|
||||
}
|
||||
}
|
||||
|
@ -1542,7 +1542,7 @@ impl<T, I> Index<I> for Vec<T> where [T]: Index<I> {
|
|||
impl<T, I> IndexMut<I> for Vec<T> where [T]: IndexMut<I> {
|
||||
#[inline]
|
||||
fn index_mut(&mut self, index: I) -> &mut Self::Output {
|
||||
// NB built-in indexing via `&mut [T]`
|
||||
// NB indexing via implementation on slice
|
||||
&mut (**self)[index]
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue