@@ -62,7 +62,7 @@ use crate::util::profile;
6262
6363use self :: context:: { Activations , Context } ;
6464use self :: dep_cache:: RegistryQueryer ;
65- use self :: types:: { Candidate , ConflictMap , ConflictReason , DepsFrame } ;
65+ use self :: types:: { ConflictMap , ConflictReason , DepsFrame } ;
6666use self :: types:: { FeaturesSet , RcVecIter , RemainingDeps , ResolverProgress } ;
6767
6868pub use self :: encode:: { EncodableDependency , EncodablePackageId , EncodableResolve } ;
@@ -181,10 +181,7 @@ fn activate_deps_loop(
181181 // Activate all the initial summaries to kick off some work.
182182 for & ( ref summary, ref method) in summaries {
183183 debug ! ( "initial activation: {}" , summary. package_id( ) ) ;
184- let candidate = Candidate {
185- summary : summary. clone ( ) ,
186- } ;
187- let res = activate ( & mut cx, registry, None , candidate, method. clone ( ) ) ;
184+ let res = activate ( & mut cx, registry, None , summary. clone ( ) , method. clone ( ) ) ;
188185 match res {
189186 Ok ( Some ( ( frame, _) ) ) => remaining_deps. push ( frame) ,
190187 Ok ( None ) => ( ) ,
@@ -369,7 +366,7 @@ fn activate_deps_loop(
369366 None
370367 } ;
371368
372- let pid = candidate. summary . package_id ( ) ;
369+ let pid = candidate. package_id ( ) ;
373370 let method = Method :: Required {
374371 dev_deps : false ,
375372 features : Rc :: clone ( & features) ,
@@ -381,7 +378,7 @@ fn activate_deps_loop(
381378 parent. name( ) ,
382379 cur,
383380 dep. package_name( ) ,
384- candidate. summary . version( )
381+ candidate. version( )
385382 ) ;
386383 let res = activate ( & mut cx, registry, Some ( ( & parent, & dep) ) , candidate, method) ;
387384
@@ -594,10 +591,10 @@ fn activate(
594591 cx : & mut Context ,
595592 registry : & mut RegistryQueryer < ' _ > ,
596593 parent : Option < ( & Summary , & Dependency ) > ,
597- candidate : Candidate ,
594+ candidate : Summary ,
598595 method : Method ,
599596) -> ActivateResult < Option < ( DepsFrame , Duration ) > > {
600- let candidate_pid = candidate. summary . package_id ( ) ;
597+ let candidate_pid = candidate. package_id ( ) ;
601598 if let Some ( ( parent, dep) ) = parent {
602599 let parent_pid = parent. package_id ( ) ;
603600 Rc :: make_mut (
@@ -656,7 +653,7 @@ fn activate(
656653 }
657654 }
658655
659- let activated = cx. flag_activated ( & candidate. summary , & method) ?;
656+ let activated = cx. flag_activated ( & candidate, & method) ?;
660657
661658 let candidate = match registry. replacement_summary ( candidate_pid) {
662659 Some ( replace) => {
@@ -675,7 +672,7 @@ fn activate(
675672 return Ok ( None ) ;
676673 }
677674 trace ! ( "activating {}" , candidate_pid) ;
678- candidate. summary
675+ candidate
679676 }
680677 } ;
681678
@@ -726,13 +723,13 @@ struct BacktrackFrame {
726723/// filtered out, and as they are filtered the causes will be added to `conflicting_prev_active`.
727724#[ derive( Clone ) ]
728725struct RemainingCandidates {
729- remaining : RcVecIter < Candidate > ,
726+ remaining : RcVecIter < Summary > ,
730727 // This is a inlined peekable generator
731- has_another : Option < Candidate > ,
728+ has_another : Option < Summary > ,
732729}
733730
734731impl RemainingCandidates {
735- fn new ( candidates : & Rc < Vec < Candidate > > ) -> RemainingCandidates {
732+ fn new ( candidates : & Rc < Vec < Summary > > ) -> RemainingCandidates {
736733 RemainingCandidates {
737734 remaining : RcVecIter :: new ( Rc :: clone ( candidates) ) ,
738735 has_another : None ,
@@ -761,14 +758,14 @@ impl RemainingCandidates {
761758 cx : & Context ,
762759 dep : & Dependency ,
763760 parent : PackageId ,
764- ) -> Option < ( Candidate , bool ) > {
761+ ) -> Option < ( Summary , bool ) > {
765762 ' main: for ( _, b) in self . remaining . by_ref ( ) {
766- let b_id = b. summary . package_id ( ) ;
763+ let b_id = b. package_id ( ) ;
767764 // The `links` key in the manifest dictates that there's only one
768765 // package in a dependency graph, globally, with that particular
769766 // `links` key. If this candidate links to something that's already
770767 // linked to by a different package then we've gotta skip this.
771- if let Some ( link) = b. summary . links ( ) {
768+ if let Some ( link) = b. links ( ) {
772769 if let Some ( & a) = cx. links . get ( & link) {
773770 if a != b_id {
774771 conflicting_prev_active
@@ -788,7 +785,7 @@ impl RemainingCandidates {
788785 // Here we throw out our candidate if it's *compatible*, yet not
789786 // equal, to all previously activated versions.
790787 if let Some ( ( a, _) ) = cx. activations . get ( & b_id. as_activations_key ( ) ) {
791- if * a != b. summary {
788+ if * a != b {
792789 conflicting_prev_active
793790 . entry ( a. package_id ( ) )
794791 . or_insert ( ConflictReason :: Semver ) ;
@@ -904,7 +901,7 @@ fn generalize_conflicting(
904901 . find (
905902 dep,
906903 & |id| {
907- if id == other. summary . package_id ( ) {
904+ if id == other. package_id ( ) {
908905 // we are imagining that we used other instead
909906 Some ( backtrack_critical_age)
910907 } else {
@@ -913,9 +910,9 @@ fn generalize_conflicting(
913910 age < backtrack_critical_age)
914911 }
915912 } ,
916- Some ( other. summary . package_id ( ) ) ,
913+ Some ( other. package_id ( ) ) ,
917914 )
918- . map ( |con| ( other. summary . package_id ( ) , con) )
915+ . map ( |con| ( other. package_id ( ) , con) )
919916 } )
920917 . collect :: < Option < Vec < ( PackageId , & ConflictMap ) > > > ( )
921918 {
@@ -972,7 +969,7 @@ fn find_candidate(
972969 parent : & Summary ,
973970 backtracked : bool ,
974971 conflicting_activations : & ConflictMap ,
975- ) -> Option < ( Candidate , bool , BacktrackFrame ) > {
972+ ) -> Option < ( Summary , bool , BacktrackFrame ) > {
976973 // When we're calling this method we know that `parent` failed to
977974 // activate. That means that some dependency failed to get resolved for
978975 // whatever reason. Normally, that means that all of those reasons
0 commit comments