Skip to content

Commit

Permalink
update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Eh2406 committed Dec 20, 2023
1 parent c697ab0 commit 7c98334
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/internal/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ pub struct State<P: Package, VS: VersionSet, Priority: Ord + Clone> {

incompatibilities: Map<P, Vec<IncompId<P, VS>>>,

/// Store the ids of incompatibilities that are already contradicted
/// and will stay that way until the next conflict and backtrack is operated.
/// Store the ids of incompatibilities that are already contradicted.
/// For each one keep track of the decision level when it was found to be contradicted.
/// These will stay contradicted until we have backtracked beyond its associated decision level.
contradicted_incompatibilities: Map<IncompId<P, VS>, DecisionLevel>,

/// All incompatibilities expressing dependencies,
Expand Down Expand Up @@ -226,6 +227,7 @@ impl<P: Package, VS: VersionSet, Priority: Ord + Clone> State<P, VS, Priority> {
) {
self.partial_solution
.backtrack(decision_level, &self.incompatibility_store);
// Remove contradicted incompatibilities that depend on decisions we just backtracked away.
self.contradicted_incompatibilities
.retain(|_, dl| *dl <= decision_level);
if incompat_changed {
Expand Down

0 comments on commit 7c98334

Please sign in to comment.