We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
PartialSolution::prioritized_packages
1 parent c22dd96 commit 4045e11Copy full SHA for 4045e11
src/internal/partial_solution.rs
@@ -293,6 +293,20 @@ impl<DP: DependencyProvider> PartialSolution<DP> {
293
}
294
295
296
+ #[cold]
297
+ pub fn prioritized_packages(&self) -> impl Iterator<Item = (Id<DP::P>, &DP::VS)> {
298
+ // TODO(konsti): Should we use `self.outdated_priorities` instead?
299
+ let current_decision_level = self.current_decision_level;
300
+ self.package_assignments
301
+ .get_range(self.current_decision_level.0 as usize..)
302
+ .unwrap()
303
+ .iter()
304
+ .filter(move |(_, pa)| pa.highest_decision_level == current_decision_level)
305
+ .filter_map(|(&p, pa)| {
306
+ Some((p, pa.assignments_intersection.potential_package_filter()?))
307
+ })
308
+ }
309
+
310
#[cold]
311
pub fn pick_highest_priority_pkg(
312
&mut self,
0 commit comments