From e2806835fa3dece56db031a8bfa604502c51afbe Mon Sep 17 00:00:00 2001 From: konsti Date: Mon, 16 Dec 2024 09:46:49 +0100 Subject: [PATCH] Merge partial solution impl blocks (pubgrub-rs#292) (#37) There were two identical impl block for `impl PartialSolution`, so I merged them. I've also reduced the visibility since `PartialSolution` is also `pub(crate)`. --- src/internal/partial_solution.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/internal/partial_solution.rs b/src/internal/partial_solution.rs index d4444d51..9804dcb8 100644 --- a/src/internal/partial_solution.rs +++ b/src/internal/partial_solution.rs @@ -210,6 +210,13 @@ impl PartialSolution { 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, &DP::Priority)> { + self.prioritized_potential_packages.iter() + } + /// Add a derivation. pub(crate) fn add_derivation( &mut self,