Skip to content

Commit

Permalink
cnf: Use a Config struct for parser options.
Browse files Browse the repository at this point in the history
  • Loading branch information
jix committed Dec 26, 2021
1 parent d0b50c6 commit cafe3cd
Show file tree
Hide file tree
Showing 7 changed files with 173 additions and 96 deletions.
2 changes: 1 addition & 1 deletion flussab-cnf/examples/roundtrip_cnf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ fn main_err() -> Result<(), ParseError> {
let stdin = std::io::stdin();
let stdout = std::io::stdout();

let mut cnf_reader = cnf::Parser::<i32>::from_read(stdin.lock(), true)?;
let mut cnf_reader = cnf::Parser::<i32>::from_read(stdin.lock(), cnf::Config::default())?;
let mut cnf_writer = DeferredWriter::from_write(stdout.lock());

if let Some(header) = cnf_reader.header() {
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 @@ -14,7 +14,7 @@ fn main_err() -> Result<(), ParseError> {
let stdin = std::io::stdin();
let stdout = std::io::stdout();

let mut gcnf_reader = gcnf::Parser::<i32>::from_read(stdin.lock(), true)?;
let mut gcnf_reader = gcnf::Parser::<i32>::from_read(stdin.lock(), gcnf::Config::default())?;
let mut gcnf_writer = DeferredWriter::from_write(stdout.lock());

if let Some(header) = gcnf_reader.header() {
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 @@ -14,7 +14,7 @@ fn main_err() -> Result<(), ParseError> {
let stdin = std::io::stdin();
let stdout = std::io::stdout();

let mut wcnf_reader = wcnf::Parser::<i32>::from_read(stdin.lock(), true)?;
let mut wcnf_reader = wcnf::Parser::<i32>::from_read(stdin.lock(), wcnf::Config::default())?;
let mut wcnf_writer = DeferredWriter::from_write(stdout.lock());

if let Some(header) = wcnf_reader.header() {
Expand Down
Loading

0 comments on commit cafe3cd

Please sign in to comment.