File tree 2 files changed +2
-3
lines changed
2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -277,7 +277,7 @@ pub struct AssociatedItems {
277
277
278
278
impl AssociatedItems {
279
279
/// Constructs an `AssociatedItems` map from a series of `ty::AssocItem`s in definition order.
280
- pub fn new ( items_in_def_order : Vec < ty:: AssocItem > ) -> Self {
280
+ pub fn new ( items_in_def_order : impl IntoIterator < Item = ty:: AssocItem > ) -> Self {
281
281
let items = items_in_def_order. into_iter ( ) . map ( |item| ( item. ident . name , item) ) . collect ( ) ;
282
282
AssociatedItems { items }
283
283
}
Original file line number Diff line number Diff line change @@ -211,8 +211,7 @@ fn associated_item_def_ids(tcx: TyCtxt<'_>, def_id: DefId) -> &[DefId] {
211
211
}
212
212
213
213
fn associated_items < ' tcx > ( tcx : TyCtxt < ' tcx > , def_id : DefId ) -> & ' tcx ty:: AssociatedItems {
214
- let items =
215
- tcx. associated_item_def_ids ( def_id) . iter ( ) . map ( |did| tcx. associated_item ( * did) ) . collect ( ) ;
214
+ let items = tcx. associated_item_def_ids ( def_id) . iter ( ) . map ( |did| tcx. associated_item ( * did) ) ;
216
215
tcx. arena . alloc ( ty:: AssociatedItems :: new ( items) )
217
216
}
218
217
You can’t perform that action at this time.
0 commit comments