File tree Expand file tree Collapse file tree 1 file changed +1
-11
lines changed Expand file tree Collapse file tree 1 file changed +1
-11
lines changed Original file line number Diff line number Diff line change @@ -210,21 +210,11 @@ impl<'tcx> FormatRenderer<'tcx> for JsonRenderer<'tcx> {
210210 debug ! ( "Done with crate" ) ;
211211 let mut index = ( * self . index ) . clone ( ) . into_inner ( ) ;
212212 index. extend ( self . get_trait_items ( cache) ) ;
213- let len = index. len ( ) ;
214- // This needs to be the default HashMap for compatibility with the public interface for
215- // rustdoc-json
216- #[ allow( rustc:: default_hash_types) ]
217213 let output = types:: Crate {
218214 root : types:: Id ( String :: from ( "0:0" ) ) ,
219215 crate_version : krate. version . clone ( ) ,
220216 includes_private : cache. document_private ,
221- index : index. into_iter ( ) . fold (
222- std:: collections:: HashMap :: with_capacity ( len) ,
223- |mut acc, ( key, val) | {
224- acc. insert ( key, val) ;
225- acc
226- } ,
227- ) ,
217+ index : index. into_iter ( ) . collect ( ) ,
228218 paths : cache
229219 . paths
230220 . clone ( )
You can’t perform that action at this time.
0 commit comments