Skip to content

Commit

Permalink
Clippy suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
jix committed Feb 7, 2023
1 parent 56f0ed4 commit fd7d41a
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions flussab-cnf/examples/parse_sat_solver_log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use flussab_cnf::{sat_solver_log, ParseError};

fn main() {
if let Err(err) = main_err() {
eprintln!("error: {}", err);
eprintln!("error: {err}");
}
}

Expand All @@ -18,6 +18,6 @@ fn main_err() -> Result<(), ParseError> {
sat_solver_log::Config::default().ignore_unknown_lines(ignore_unknown_lines),
)?;

println!("{:?}", log);
println!("{log:?}");
Ok(())
}
2 changes: 1 addition & 1 deletion flussab-cnf/examples/roundtrip_cnf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use flussab_cnf::{cnf, ParseError};

fn main() {
if let Err(err) = main_err() {
eprintln!("error: {}", err);
eprintln!("error: {err}");
}
}

Expand Down
2 changes: 1 addition & 1 deletion flussab-cnf/examples/roundtrip_gcnf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use flussab_cnf::{gcnf, ParseError};

fn main() {
if let Err(err) = main_err() {
eprintln!("error: {}", err);
eprintln!("error: {err}");
}
}

Expand Down
2 changes: 1 addition & 1 deletion flussab-cnf/examples/roundtrip_wcnf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use flussab_cnf::{wcnf, ParseError};

fn main() {
if let Err(err) = main_err() {
eprintln!("error: {}", err);
eprintln!("error: {err}");
}
}

Expand Down
4 changes: 2 additions & 2 deletions flussab-cnf/src/token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,9 @@ pub fn unexpected(input: &mut LineReader, expected: &str) -> ParseError {
let mut unexpected_bytes = vec![];

if text::newline(input.reader(), 0) != 0 {
return input.give_up(format!("expected {}, found end of line", expected));
return input.give_up(format!("expected {expected}, found end of line"));
} else if input.reader.is_at_end() {
return input.give_up(format!("expected {}, found end of file", expected));
return input.give_up(format!("expected {expected}, found end of file"));
}

while unexpected_bytes.len() < 60 {
Expand Down

0 comments on commit fd7d41a

Please sign in to comment.