From: Mazdak Farrokhzad Date: Tue, 7 Jan 2020 14:06:39 +0000 (+0100) Subject: hir::map: elide & simplify X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=3f13ba8523e8aefa670c061b0d0d5e551b47fb45;p=rust.git hir::map: elide & simplify --- 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 {