Skip to content

Commit

Permalink
Merge partial solution impl blocks (pubgrub-rs#292) (#37)
Browse files Browse the repository at this point in the history
There were two identical impl block for `impl<DP: DependencyProvider>
PartialSolution<DP>`, so I merged them. I've also reduced the visibility
since `PartialSolution` is also `pub(crate)`.
  • Loading branch information
konstin authored Dec 16, 2024
1 parent 3624c3b commit e280683
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/internal/partial_solution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,13 @@ impl<DP: DependencyProvider> PartialSolution<DP> {
self.next_global_index += 1;
}

/// The list of package that have not been selected after the last prioritization.
///
/// This list gets updated by [`Self::pick_highest_priority_pkg`] and cleared by backtracking.
pub fn undecided_packages(&self) -> impl Iterator<Item = (&Id<DP::P>, &DP::Priority)> {
self.prioritized_potential_packages.iter()
}

/// Add a derivation.
pub(crate) fn add_derivation(
&mut self,
Expand Down

0 comments on commit e280683

Please sign in to comment.