Skip to content

Commit

Permalink
fix: return of ok if clause not added
Browse files Browse the repository at this point in the history
  • Loading branch information
nfbruns committed Jun 26, 2024
1 parent a0e84a1 commit 8ecd6ad
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions batsat/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ impl Solve for BatsatBasicSolver {
error: "BatSat Solver is in an UNSAT state".into(),
}
.into()),

_ => unreachable!(),
}
}
Expand All @@ -65,10 +64,9 @@ impl Solve for BatsatBasicSolver {
.map(|l| batsat::Lit::new(self.0.var_of_int(l.vidx32() + 1), l.is_pos()))
.collect::<Vec<batsat::Lit>>();

match self.0.add_clause_reuse(&mut c) {
true => Ok(()),
false => Ok(()), //Err(SolverError::Api("Currently in an UNSAT state".into())),
}
self.0.add_clause_reuse(&mut c);

Ok(())
}
}

Expand Down

0 comments on commit 8ecd6ad

Please sign in to comment.