Skip to content

Commit

Permalink
docs: fix broken links
Browse files Browse the repository at this point in the history
  • Loading branch information
chrjabs committed Apr 23, 2024
1 parent 98a4187 commit 466749b
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions rustsat/src/instances/multiopt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ impl<VM: ManageVars> MultiOptInstance<VM> {
///
/// # 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<P: AsRef<Path>>(&self, path: P) -> anyhow::Result<()> {
let mut writer = fio::open_compressed_uncompressed_write(path)?;
Expand All @@ -302,7 +302,7 @@ impl<VM: ManageVars> MultiOptInstance<VM> {
///
/// # 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<W: io::Write>(&self, writer: &mut W) -> anyhow::Result<()> {
if self.constrs.n_cards() > 0 || self.constrs.n_pbs() > 0 {
Expand Down
4 changes: 2 additions & 2 deletions rustsat/src/instances/opt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1208,7 +1208,7 @@ impl<VM: ManageVars> OptInstance<VM> {
///
/// # 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<P: AsRef<Path>>(&self, path: P) -> anyhow::Result<()> {
let mut writer = fio::open_compressed_uncompressed_write(path)?;
Expand All @@ -1227,7 +1227,7 @@ impl<VM: ManageVars> OptInstance<VM> {
///
/// # 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<W: io::Write>(&self, writer: &mut W) -> anyhow::Result<()> {
if self.constrs.n_cards() > 0 || self.constrs.n_pbs() > 0 {
Expand Down
4 changes: 2 additions & 2 deletions rustsat/src/instances/sat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ impl<VM: ManageVars> SatInstance<VM> {
///
/// # 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<P: AsRef<Path>>(&self, path: P) -> anyhow::Result<()> {
let mut writer = fio::open_compressed_uncompressed_write(path)?;
Expand All @@ -686,7 +686,7 @@ impl<VM: ManageVars> SatInstance<VM> {
///
/// # 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<W: io::Write>(&self, writer: &mut W) -> anyhow::Result<()> {
if self.n_cards() > 0 || self.n_pbs() > 0 {
Expand Down
4 changes: 2 additions & 2 deletions rustsat/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<c_int, TypeError> {
(self.idx32() + 1)
.try_into()
Expand Down Expand Up @@ -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<c_int, TypeError> {
let negated = self.is_neg();
let idx: c_int = match (self.vidx() + 1).try_into() {
Expand Down
2 changes: 1 addition & 1 deletion tools/src/bin/shuffledimacs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand Down

0 comments on commit 466749b

Please sign in to comment.