diff --git a/src/internal/partial_solution.rs b/src/internal/partial_solution.rs index 8d82cb38..ebc70721 100644 --- a/src/internal/partial_solution.rs +++ b/src/internal/partial_solution.rs @@ -246,7 +246,10 @@ impl PartialSolution Priority) -> Option

{ + pub fn pick_highest_priority_pkg( + &mut self, + prioritizer: impl Fn(&P, &VS) -> Priority, + ) -> Option

{ let check_all = self.changed_this_decision_level == self.current_decision_level.0.saturating_sub(1) as usize; let current_decision_level = self.current_decision_level; diff --git a/src/solver.rs b/src/solver.rs index 07b1552d..a539220d 100644 --- a/src/solver.rs +++ b/src/solver.rs @@ -103,13 +103,13 @@ pub fn resolve( state.partial_solution ); - let Some(potential_packages) = state + let Some(highest_priority_pkg) = state .partial_solution - .prioritize(|p, r| dependency_provider.prioritize(p, r)) + .pick_highest_priority_pkg(|p, r| dependency_provider.prioritize(p, r)) else { return Ok(state.partial_solution.extract_solution()); }; - next = potential_packages; + next = highest_priority_pkg; let term_intersection = state .partial_solution