File tree Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Original file line number Diff line number Diff line change @@ -205,21 +205,14 @@ impl<'tcx> FormatRenderer<'tcx> for JsonRenderer<'tcx> {
205205 debug ! ( "Done with crate" ) ;
206206 let mut index = ( * self . index ) . clone ( ) . into_inner ( ) ;
207207 index. extend ( self . get_trait_items ( ) ) ;
208- let len = index. len ( ) ;
209208 // This needs to be the default HashMap for compatibility with the public interface for
210209 // rustdoc-json
211210 #[ allow( rustc:: default_hash_types) ]
212211 let output = types:: Crate {
213212 root : types:: Id ( String :: from ( "0:0" ) ) ,
214213 crate_version : krate. version . clone ( ) ,
215214 includes_private : self . cache . document_private ,
216- index : index. into_iter ( ) . fold (
217- std:: collections:: HashMap :: with_capacity ( len) ,
218- |mut acc, ( key, val) | {
219- acc. insert ( key, val) ;
220- acc
221- } ,
222- ) ,
215+ index : index. into_iter ( ) . collect ( ) ,
223216 paths : self
224217 . cache
225218 . paths
You can’t perform that action at this time.
0 commit comments