Skip to content

Commit

Permalink
Replace VerboseError ContextError
Browse files Browse the repository at this point in the history
  • Loading branch information
sthiele committed Oct 26, 2023
1 parent cc98510 commit 48935c3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -331,12 +331,12 @@ fn test_constraints() {
}
pub fn write_fz_stmt(
mut out: impl Write,
input: &str,
mut input: &str,
constraint_counter: &mut usize,
level: &mut i32,
) -> Result<()> {
match statement::<VerboseError<&str>>(input) {
Ok((_rest, stmt)) => {
match statement::<ContextError<&str>>(&mut input) {
Ok(stmt) => {
match stmt {
Stmt::Comment(s) => {
writeln!(out, "%{s}")?;
Expand Down Expand Up @@ -382,10 +382,10 @@ pub fn write_fz_stmt(
}
Ok(())
}
Err(Err::Error(e)) | Err(Err::Failure(e)) => {
let msg = convert_error(input, e);
Err(FlatZincError::ParseError { msg }.into())
}
// Err(Err::Error(e)) | Err(Err::Failure(e)) => {
// let msg = convert_error(input, e);
// Err(FlatZincError::ParseError { msg }.into())
// }
Err(e) => Err(FlatZincError::ParseError {
msg: format!("{e}"),
}
Expand Down

0 comments on commit 48935c3

Please sign in to comment.