File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -205,7 +205,7 @@ impl Resolve {
205
205
self . graph . path_to_top ( pkg)
206
206
}
207
207
208
- pub fn register_used_patches ( & mut self , patches : & [ Summary ] ) {
208
+ pub fn register_used_patches < ' a > ( & mut self , patches : impl Iterator < Item = & ' a Summary > ) {
209
209
for summary in patches {
210
210
if !self . graph . contains ( & summary. package_id ( ) ) {
211
211
self . unused_patches . push ( summary. package_id ( ) )
Original file line number Diff line number Diff line change @@ -412,12 +412,9 @@ pub fn resolve_with_previous<'gctx>(
412
412
ResolveVersion :: with_rust_version ( ws. rust_version ( ) ) ,
413
413
Some ( ws. gctx ( ) ) ,
414
414
) ?;
415
- let patches: Vec < _ > = registry
416
- . patches ( )
417
- . values ( )
418
- . flat_map ( |v| v. iter ( ) . cloned ( ) )
419
- . collect ( ) ;
420
- resolved. register_used_patches ( & patches[ ..] ) ;
415
+
416
+ let patches = registry. patches ( ) . values ( ) . flat_map ( |v| v. iter ( ) ) ;
417
+ resolved. register_used_patches ( patches) ;
421
418
422
419
if register_patches && !resolved. unused_patches ( ) . is_empty ( ) {
423
420
emit_warnings_of_unused_patches ( ws, & resolved, registry) ?;
You can’t perform that action at this time.
0 commit comments