File tree 1 file changed +6
-7
lines changed
src/librustc_metadata/rmeta
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> {
1863
1863
}
1864
1864
1865
1865
fn all_def_path_hashes_and_def_ids ( & self ) -> Vec < ( DefPathHash , DefId ) > {
1866
- let mut result = Vec :: new ( ) ;
1867
1866
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 ( )
1874
1873
}
1875
1874
1876
1875
/// Get the `DepNodeIndex` corresponding this crate. The result of this
You can’t perform that action at this time.
0 commit comments