diff --git a/rustsat/src/instances/multiopt.rs b/rustsat/src/instances/multiopt.rs index 4ebeb142..ce0e56dd 100644 --- a/rustsat/src/instances/multiopt.rs +++ b/rustsat/src/instances/multiopt.rs @@ -283,7 +283,7 @@ impl MultiOptInstance { /// /// # Errors /// - /// - If the instance is not clausal, returns [`NonClausal`] + /// - If the instance is not clausal, returns [`RequiresClausal`] /// - Returns [`io::Error`] on errors during writing pub fn write_dimacs_path>(&self, path: P) -> anyhow::Result<()> { let mut writer = fio::open_compressed_uncompressed_write(path)?; @@ -302,7 +302,7 @@ impl MultiOptInstance { /// /// # Errors /// - /// - If the instance is not clausal, returns [`NonClausal`] + /// - If the instance is not clausal, returns [`RequiresClausal`] /// - Returns [`io::Error`] on errors during writing pub fn write_dimacs(&self, writer: &mut W) -> anyhow::Result<()> { if self.constrs.n_cards() > 0 || self.constrs.n_pbs() > 0 { diff --git a/rustsat/src/instances/opt.rs b/rustsat/src/instances/opt.rs index 9c6e6193..86c439d3 100644 --- a/rustsat/src/instances/opt.rs +++ b/rustsat/src/instances/opt.rs @@ -1208,7 +1208,7 @@ impl OptInstance { /// /// # Errors /// - /// - If the instance is not clausal, returns [`NonClausal`] + /// - If the instance is not clausal, returns [`RequiresClausal`] /// - Returns [`io::Error`] on errors during writing pub fn write_dimacs_path>(&self, path: P) -> anyhow::Result<()> { let mut writer = fio::open_compressed_uncompressed_write(path)?; @@ -1227,7 +1227,7 @@ impl OptInstance { /// /// # Errors /// - /// - If the instance is not clausal, returns [`NonClausal`] + /// - If the instance is not clausal, returns [`RequiresClausal`] /// - Returns [`io::Error`] on errors during writing pub fn write_dimacs(&self, writer: &mut W) -> anyhow::Result<()> { if self.constrs.n_cards() > 0 || self.constrs.n_pbs() > 0 { diff --git a/rustsat/src/instances/sat.rs b/rustsat/src/instances/sat.rs index ed6a55c0..b765983e 100644 --- a/rustsat/src/instances/sat.rs +++ b/rustsat/src/instances/sat.rs @@ -667,7 +667,7 @@ impl SatInstance { /// /// # Errors /// - /// - If the instance is not clausal, returns [`NonClausal`] + /// - If the instance is not clausal, returns [`RequiresClausal`] /// - Returns [`io::Error`] on errors during writing pub fn write_dimacs_path>(&self, path: P) -> anyhow::Result<()> { let mut writer = fio::open_compressed_uncompressed_write(path)?; @@ -686,7 +686,7 @@ impl SatInstance { /// /// # Errors /// - /// - If the instance is not clausal, returns [`NonClausal`] + /// - If the instance is not clausal, returns [`RequiresClausal`] /// - Returns [`io::Error`] on errors during writing pub fn write_dimacs(&self, writer: &mut W) -> anyhow::Result<()> { if self.n_cards() > 0 || self.n_pbs() > 0 { diff --git a/rustsat/src/types.rs b/rustsat/src/types.rs index 8846bfa4..3c9ccdba 100644 --- a/rustsat/src/types.rs +++ b/rustsat/src/types.rs @@ -155,7 +155,7 @@ impl Var { /// will have idx+1 and be negative if the literal is negated. Returns /// `Err(TypeError::IdxTooHigh(_, _))` if the literal does not fit into a `c_int`. As [`c_int` /// will almost always be `i32`](https://doc.rust-lang.org/std/os/raw/type.c_int.html), it is - /// mostly safe to simply use [`to_ipasir`] instead. + /// mostly safe to simply use [`Self::to_ipasir`] instead. pub fn to_ipasir_with_error(self) -> Result { (self.idx32() + 1) .try_into() @@ -396,7 +396,7 @@ impl Lit { /// will have idx+1 and be negative if the literal is negated. Returns /// `Err(TypeError::IdxTooHigh(_, _))` if the literal does not fit into a `c_int`. As [`c_int` /// will almost always be `i32`](https://doc.rust-lang.org/std/os/raw/type.c_int.html), it is - /// mostly safe to simply use [`to_ipasir`] instead. + /// mostly safe to simply use [`Self::to_ipasir`] instead. pub fn to_ipasir_with_error(self) -> Result { let negated = self.is_neg(); let idx: c_int = match (self.vidx() + 1).try_into() { diff --git a/tools/src/bin/shuffledimacs.rs b/tools/src/bin/shuffledimacs.rs index e10c61e9..71f28ef9 100644 --- a/tools/src/bin/shuffledimacs.rs +++ b/tools/src/bin/shuffledimacs.rs @@ -3,7 +3,7 @@ //! A small tool for shuffling the order of constraints and the variable //! indexing in a DIMACS file. //! -//! Usage: shuffledimacs [dimacs [m,w]cnf file] [output path] +//! Usage: `shuffledimacs [dimacs [m,w]cnf file] [output path]` use std::path::{Path, PathBuf};