Skip to content

Commit

Permalink
assert when no conditional candidates where found
Browse files Browse the repository at this point in the history
  • Loading branch information
prsabahrami committed Jan 28, 2025
1 parent 28210b9 commit f65436b
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/solver/clause.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,14 +247,7 @@ impl Clause {
let mut requirement_candidates = requirement_candidates.into_iter();

Check warning on line 247 in src/solver/clause.rs

View workflow job for this annotation

GitHub Actions / Format and Lint

Diff in /home/runner/work/resolvo/resolvo/src/solver/clause.rs

// Check if we have any condition candidates
let Some(first_condition) = condition_candidates.next() else {
// No conditions means this is just an assertion
return (
Clause::Conditional(parent_id, condition, requirement),
None,
false,
);
};
let first_condition = condition_candidates.next().expect("no condition candidates");

// Try to find a condition candidate that is undecided or true
let condition_literal = std::iter::once(first_condition)
Expand Down

0 comments on commit f65436b

Please sign in to comment.