File tree 1 file changed +1
-8
lines changed
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> {
205
205
debug ! ( "Done with crate" ) ;
206
206
let mut index = ( * self . index ) . clone ( ) . into_inner ( ) ;
207
207
index. extend ( self . get_trait_items ( ) ) ;
208
- let len = index. len ( ) ;
209
208
// This needs to be the default HashMap for compatibility with the public interface for
210
209
// rustdoc-json
211
210
#[ allow( rustc:: default_hash_types) ]
212
211
let output = types:: Crate {
213
212
root : types:: Id ( String :: from ( "0:0" ) ) ,
214
213
crate_version : krate. version . clone ( ) ,
215
214
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 ( ) ,
223
216
paths : self
224
217
. cache
225
218
. paths
You can’t perform that action at this time.
0 commit comments