Moved all encoding and decoding functions onto Codec methods that contain configuration set with a builder pattern on Config structs.
Part of issue #24.
This commit is contained in:
parent
311040f46c
commit
dd17f1f65d
1 changed files with 569 additions and 332 deletions
|
|
@ -14,7 +14,6 @@ mod error;
|
|||
use error::{Error, Result};
|
||||
|
||||
use clap::Arg;
|
||||
use framed::typed::Receiver;
|
||||
use std::io::{stdin, stdout};
|
||||
|
||||
arg_enum! {
|
||||
|
|
@ -47,7 +46,9 @@ fn try() -> Result<()> {
|
|||
let matches = app.get_matches();
|
||||
let out_fmt = value_t!(matches, "out-format", OutputFormat)?;
|
||||
|
||||
let mut r = Receiver::<_, UserType>::new(stdin());
|
||||
let mut r = framed::bytes::Config::default()
|
||||
.typed::<UserType>()
|
||||
.into_receiver(stdin());
|
||||
|
||||
let mut csvw: Option<csv::Writer<_>> =
|
||||
match out_fmt {
|
||||
|
|
|
|||
Loading…
Reference in a new issue