diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2020-01-07 15:06:39 +0100 |
|---|---|---|
| committer | Mazdak Farrokhzad <twingoow@gmail.com> | 2020-01-08 21:58:41 +0100 |
| commit | 3f13ba8523e8aefa670c061b0d0d5e551b47fb45 (patch) | |
| tree | 25a8bbd0af1fd00c687eeea713a33d8b6d8ab85f | |
| parent | 41453d2f744e6ae6bf95867e29387f098c988265 (diff) | |
| download | rust-3f13ba8523e8aefa670c061b0d0d5e551b47fb45.tar.gz rust-3f13ba8523e8aefa670c061b0d0d5e551b47fb45.zip | |
hir::map: elide & simplify
| -rw-r--r-- | src/librustc/hir/map/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librustc/hir/map/mod.rs b/src/librustc/hir/map/mod.rs index 8fedcac9e23..05b0c8e36fd 100644 --- a/src/librustc/hir/map/mod.rs +++ b/src/librustc/hir/map/mod.rs @@ -186,12 +186,12 @@ struct ParentHirIterator<'map, 'hir> { } impl<'map, 'hir> ParentHirIterator<'map, 'hir> { - fn new(current_id: HirId, map: &'map Map<'hir>) -> ParentHirIterator<'map, 'hir> { - ParentHirIterator { current_id, map } + fn new(current_id: HirId, map: &'map Map<'hir>) -> Self { + Self { current_id, map } } } -impl<'map, 'hir> Iterator for ParentHirIterator<'map, 'hir> { +impl<'hir> Iterator for ParentHirIterator<'_, 'hir> { type Item = (HirId, Node<'hir>); fn next(&mut self) -> Option<Self::Item> { |
