File tree 1 file changed +1
-11
lines changed
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> {
210
210
debug ! ( "Done with crate" ) ;
211
211
let mut index = ( * self . index ) . clone ( ) . into_inner ( ) ;
212
212
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) ]
217
213
let output = types:: Crate {
218
214
root : types:: Id ( String :: from ( "0:0" ) ) ,
219
215
crate_version : krate. version . clone ( ) ,
220
216
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 ( ) ,
228
218
paths : cache
229
219
. paths
230
220
. clone ( )
You can’t perform that action at this time.
0 commit comments