diff options
| author | Clemens Wasser <clemens.wasser@gmail.com> | 2021-10-09 20:44:22 +0200 |
|---|---|---|
| committer | Clemens Wasser <clemens.wasser@gmail.com> | 2021-10-10 15:38:19 +0200 |
| commit | 71dd0b928b8b175b69e56fc58e5878b73f090718 (patch) | |
| tree | aeffddc5806cdc0d8b3d866d13c6235385b876a5 /compiler/rustc_index/src/vec.rs | |
| parent | 15491d7b6be1065217e09bd735e4ecffbe9838ba (diff) | |
| download | rust-71dd0b928b8b175b69e56fc58e5878b73f090718.tar.gz rust-71dd0b928b8b175b69e56fc58e5878b73f090718.zip | |
Apply clippy suggestions
Diffstat (limited to 'compiler/rustc_index/src/vec.rs')
| -rw-r--r-- | compiler/rustc_index/src/vec.rs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/compiler/rustc_index/src/vec.rs b/compiler/rustc_index/src/vec.rs index 88315246834..e9efa2f255d 100644 --- a/compiler/rustc_index/src/vec.rs +++ b/compiler/rustc_index/src/vec.rs @@ -634,18 +634,15 @@ impl<I: Idx, T> IndexVec<I, T> { } #[inline] - pub fn drain<'a, R: RangeBounds<usize>>( - &'a mut self, - range: R, - ) -> impl Iterator<Item = T> + 'a { + pub fn drain<R: RangeBounds<usize>>(&mut self, range: R) -> impl Iterator<Item = T> + '_ { self.raw.drain(range) } #[inline] - pub fn drain_enumerated<'a, R: RangeBounds<usize>>( - &'a mut self, + pub fn drain_enumerated<R: RangeBounds<usize>>( + &mut self, range: R, - ) -> impl Iterator<Item = (I, T)> + 'a { + ) -> impl Iterator<Item = (I, T)> + '_ { self.raw.drain(range).enumerate().map(|(n, t)| (I::new(n), t)) } |
