IndexVec: add '_
to make clear where borrowing is happening
This commit is contained in:
parent
72675d82d7
commit
09b44bbe77
2 changed files with 3 additions and 2 deletions
|
@ -416,7 +416,7 @@ impl<I: Idx, T> IndexVec<I, T> {
|
|||
}
|
||||
|
||||
#[inline]
|
||||
pub fn iter_enumerated(&self) -> Enumerated<I, slice::Iter<T>>
|
||||
pub fn iter_enumerated(&self) -> Enumerated<I, slice::Iter<'_, T>>
|
||||
{
|
||||
self.raw.iter().enumerate().map(IntoIdx { _marker: PhantomData })
|
||||
}
|
||||
|
@ -432,7 +432,7 @@ impl<I: Idx, T> IndexVec<I, T> {
|
|||
}
|
||||
|
||||
#[inline]
|
||||
pub fn iter_enumerated_mut(&mut self) -> Enumerated<I, slice::IterMut<T>>
|
||||
pub fn iter_enumerated_mut(&mut self) -> Enumerated<I, slice::IterMut<'_, T>>
|
||||
{
|
||||
self.raw.iter_mut().enumerate().map(IntoIdx { _marker: PhantomData })
|
||||
}
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#![feature(i128)]
|
||||
#![feature(conservative_impl_trait)]
|
||||
#![feature(specialization)]
|
||||
#![feature(underscore_lifetimes)]
|
||||
|
||||
#![cfg_attr(unix, feature(libc))]
|
||||
#![cfg_attr(test, feature(test))]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue