@@ -556,13 +556,6 @@ fn lock(locked: &LockedMap, patches: &HashMap<Url, Vec<PackageId>>, summary: Sum
556
556
// requirement has changed. In this case we must discard the
557
557
// locked version because the dependency needs to be
558
558
// re-resolved.
559
- //
560
- // 3. We don't have a lock entry for this dependency, in which
561
- // case it was likely an optional dependency which wasn't
562
- // included previously so we just pass it through anyway.
563
- //
564
- // Cases 1/2 are handled by `matches_id` and case 3 is handled by
565
- // falling through to the logic below.
566
559
if let Some ( & ( _, ref locked_deps) ) = pair {
567
560
let locked = locked_deps. iter ( ) . find ( |id| dep. matches_id ( id) ) ;
568
561
if let Some ( locked) = locked {
@@ -573,20 +566,6 @@ fn lock(locked: &LockedMap, patches: &HashMap<Url, Vec<PackageId>>, summary: Sum
573
566
}
574
567
}
575
568
576
- // If this dependency did not have a locked version, then we query
577
- // all known locked packages to see if they match this dependency.
578
- // If anything does then we lock it to that and move on.
579
- let v = locked
580
- . get ( dep. source_id ( ) )
581
- . and_then ( |map| map. get ( & * dep. name ( ) ) )
582
- . and_then ( |vec| vec. iter ( ) . find ( |& & ( ref id, _) | dep. matches_id ( id) ) ) ;
583
- if let Some ( & ( ref id, _) ) = v {
584
- trace ! ( "\t second hit on {}" , id) ;
585
- let mut dep = dep. clone ( ) ;
586
- dep. lock_to ( id) ;
587
- return dep;
588
- }
589
-
590
569
// Finally we check to see if any registered patches correspond to
591
570
// this dependency.
592
571
let v = patches. get ( dep. source_id ( ) . url ( ) ) . map ( |vec| {
0 commit comments