File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
src/librustc_metadata/rmeta Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -1863,14 +1863,13 @@ impl<'a, 'tcx> CrateMetadataRef<'a> {
18631863 }
18641864
18651865 fn all_def_path_hashes_and_def_ids ( & self ) -> Vec < ( DefPathHash , DefId ) > {
1866- let mut result = Vec :: new ( ) ;
18671866 let mut def_path_hashes = self . def_path_hash_cache . lock ( ) ;
1868- for index in 0 ..self . num_def_ids ( ) {
1869- let index = DefIndex :: from_usize ( index) ;
1870- let def_path_hash = self . def_path_hash_unlocked ( index, & mut def_path_hashes ) ;
1871- result . push ( ( def_path_hash , self . local_def_id ( index) ) ) ;
1872- }
1873- result
1867+ ( 0 ..self . num_def_ids ( ) )
1868+ . map ( | index| {
1869+ let index = DefIndex :: from_usize ( index) ;
1870+ ( self . def_path_hash_unlocked ( index , & mut def_path_hashes ) , self . local_def_id ( index) )
1871+ } )
1872+ . collect ( )
18741873 }
18751874
18761875 /// Get the `DepNodeIndex` corresponding this crate. The result of this
You can’t perform that action at this time.
0 commit comments