]> git.lizzy.rs Git - rust.git/commitdiff
hir::map: elide & simplify
authorMazdak Farrokhzad <twingoow@gmail.com>
Tue, 7 Jan 2020 14:06:39 +0000 (15:06 +0100)
committerMazdak Farrokhzad <twingoow@gmail.com>
Wed, 8 Jan 2020 20:58:41 +0000 (21:58 +0100)
src/librustc/hir/map/mod.rs

index 8fedcac9e23a4ab26dc74914f56d7cb2b22a5cf6..05b0c8e36fdf6122ba99d19dd31a989aafcfd197 100644 (file)
@@ -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> {