@@ -1342,30 +1342,30 @@ impl<'a> Resolver<'a> {
13421342 extern_crate_map : self
13431343 . extern_crate_map
13441344 . iter ( )
1345- . map ( |( k, v) | ( self . definitions . local_def_id ( k. clone ( ) ) . to_def_id ( ) , v. clone ( ) ) )
1345+ . map ( |( & k, & v) | ( self . definitions . local_def_id ( k) . to_def_id ( ) , v) )
13461346 . collect ( ) ,
13471347 export_map : self
13481348 . export_map
13491349 . iter ( )
1350- . map ( |( k, v) | {
1350+ . map ( |( & k, v) | {
13511351 (
1352- k. clone ( ) ,
1352+ k,
13531353 v. iter ( )
1354- . map ( |e| e. clone ( ) . map_id ( |id| self . definitions . node_id_to_hir_id ( id) ) )
1354+ . map ( |e| e. map_id ( |id| self . definitions . node_id_to_hir_id ( id) ) )
13551355 . collect ( ) ,
13561356 )
13571357 } )
13581358 . collect ( ) ,
13591359 trait_map : self
13601360 . trait_map
13611361 . iter ( )
1362- . map ( |( k, v) | {
1362+ . map ( |( & k, v) | {
13631363 (
1364- self . definitions . node_id_to_hir_id ( k. clone ( ) ) ,
1364+ self . definitions . node_id_to_hir_id ( k) ,
13651365 v. iter ( )
1366+ . cloned ( )
13661367 . map ( |tc| {
1367- tc. clone ( )
1368- . map_import_ids ( |id| self . definitions . node_id_to_hir_id ( id) )
1368+ tc. map_import_ids ( |id| self . definitions . node_id_to_hir_id ( id) )
13691369 } )
13701370 . collect ( ) ,
13711371 )
@@ -1374,17 +1374,17 @@ impl<'a> Resolver<'a> {
13741374 glob_map : self
13751375 . glob_map
13761376 . iter ( )
1377- . map ( |( id, names) | ( self . definitions . local_def_id ( id. clone ( ) ) , names. clone ( ) ) )
1377+ . map ( |( & id, names) | ( self . definitions . local_def_id ( id) , names. clone ( ) ) )
13781378 . collect ( ) ,
13791379 maybe_unused_trait_imports : self
13801380 . maybe_unused_trait_imports
13811381 . iter ( )
1382- . map ( |id| self . definitions . local_def_id ( id. clone ( ) ) )
1382+ . map ( |& id| self . definitions . local_def_id ( id) )
13831383 . collect ( ) ,
13841384 maybe_unused_extern_crates : self
13851385 . maybe_unused_extern_crates
13861386 . iter ( )
1387- . map ( |( id, sp) | ( self . definitions . local_def_id ( id. clone ( ) ) . to_def_id ( ) , sp. clone ( ) ) )
1387+ . map ( |& ( id, sp) | ( self . definitions . local_def_id ( id) . to_def_id ( ) , sp) )
13881388 . collect ( ) ,
13891389 extern_prelude : self
13901390 . extern_prelude
0 commit comments