Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
chrjabs committed Jul 11, 2023
1 parent 7320b67 commit 479e2d8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/encodings/am1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
//! assert_eq!(res, SolverResult::Sat);
//! ```
use super::EncodingError;
use super::Error;
use crate::{
instances::{ManageVars, Cnf},
instances::{Cnf, ManageVars},
types::Lit,
};

Expand All @@ -49,7 +49,7 @@ pub trait Encode: Default + From<Vec<Lit>> + FromIterator<Lit> + Extend<Lit> {
/// Gets the number of literals in the encoding
fn n_lits(&self) -> usize;
/// Encodes and enforces the at-most-1 constraint
fn encode(&mut self, var_manager: &mut dyn ManageVars) -> Result<Cnf, EncodingError>;
fn encode(&mut self, var_manager: &mut dyn ManageVars) -> Result<Cnf, Error>;
}

/// The default at-most-1 encoding. For now this is a [`Pairwise`] encoding.
Expand Down
6 changes: 3 additions & 3 deletions src/encodings/am1/pairwise.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
use super::Encode;
use crate::{
encodings::{EncodeStats, EncodingError},
instances::{ManageVars, Cnf},
encodings::{EncodeStats, Error},
instances::{Cnf, ManageVars},
types::Lit,
};

Expand Down Expand Up @@ -35,7 +35,7 @@ impl Encode for Pairwise {
self.in_lits.len()
}

fn encode(&mut self, _var_manager: &mut dyn ManageVars) -> Result<Cnf, EncodingError> {
fn encode(&mut self, _var_manager: &mut dyn ManageVars) -> Result<Cnf, Error> {
self.n_clauses = 0;
let mut cnf = Cnf::new();
for first in 0..self.in_lits.len() {
Expand Down
6 changes: 3 additions & 3 deletions src/solvers/minisat/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ use core::ffi::{c_int, CStr};

use super::Limit;
use crate::solvers::{
GetInternalStats, InternalSolverState, Interrupt, LimitConflicts, LimitPropagations, PhaseLit,
Solve, SolveIncremental, SolveMightFail, SolveStats, SolverError, SolverResult, SolverState,
SolverStats, InterruptSolver,
GetInternalStats, InternalSolverState, Interrupt, InterruptSolver, LimitConflicts,
LimitPropagations, PhaseLit, Solve, SolveIncremental, SolveMightFail, SolveStats, SolverError,
SolverResult, SolverState, SolverStats,
};
use crate::types::{Clause, Lit, TernaryVal, Var};
use cpu_time::ProcessTime;
Expand Down

0 comments on commit 479e2d8

Please sign in to comment.