From 479e2d8a7a5a7eeebbf14d5f6d1a83e6091fb58a Mon Sep 17 00:00:00 2001 From: Christoph Jabs Date: Tue, 11 Jul 2023 11:33:18 +0300 Subject: [PATCH] formatting --- src/encodings/am1.rs | 6 +++--- src/encodings/am1/pairwise.rs | 6 +++--- src/solvers/minisat/core.rs | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/encodings/am1.rs b/src/encodings/am1.rs index ee0c4c62..455d3450 100644 --- a/src/encodings/am1.rs +++ b/src/encodings/am1.rs @@ -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, }; @@ -49,7 +49,7 @@ pub trait Encode: Default + From> + FromIterator + Extend { /// 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; + fn encode(&mut self, var_manager: &mut dyn ManageVars) -> Result; } /// The default at-most-1 encoding. For now this is a [`Pairwise`] encoding. diff --git a/src/encodings/am1/pairwise.rs b/src/encodings/am1/pairwise.rs index 23c7c215..b1e98a79 100644 --- a/src/encodings/am1/pairwise.rs +++ b/src/encodings/am1/pairwise.rs @@ -6,8 +6,8 @@ use super::Encode; use crate::{ - encodings::{EncodeStats, EncodingError}, - instances::{ManageVars, Cnf}, + encodings::{EncodeStats, Error}, + instances::{Cnf, ManageVars}, types::Lit, }; @@ -35,7 +35,7 @@ impl Encode for Pairwise { self.in_lits.len() } - fn encode(&mut self, _var_manager: &mut dyn ManageVars) -> Result { + fn encode(&mut self, _var_manager: &mut dyn ManageVars) -> Result { self.n_clauses = 0; let mut cnf = Cnf::new(); for first in 0..self.in_lits.len() { diff --git a/src/solvers/minisat/core.rs b/src/solvers/minisat/core.rs index 7060ee8e..d064fff6 100644 --- a/src/solvers/minisat/core.rs +++ b/src/solvers/minisat/core.rs @@ -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;