diff --git a/src/cmd/headers.rs b/src/cmd/headers.rs index d9e39e5b..d531bdd2 100644 --- a/src/cmd/headers.rs +++ b/src/cmd/headers.rs @@ -57,7 +57,7 @@ pub fn run(argv: &[&str]) -> CliResult<()> { } } - let mut wtr: Box = + let mut wtr: Box = if args.flag_just_names { Box::new(io::stdout()) } else { diff --git a/src/cmd/join.rs b/src/cmd/join.rs index 98fbbd35..c2fafce1 100644 --- a/src/cmd/join.rs +++ b/src/cmd/join.rs @@ -278,7 +278,7 @@ impl IoState { impl Args { fn new_io_state(&self) - -> CliResult>> { + -> CliResult>> { let rconf1 = Config::new(&Some(self.arg_input1.clone())) .delimiter(self.flag_delimiter) .no_headers(self.flag_no_headers) diff --git a/src/cmd/partition.rs b/src/cmd/partition.rs index 68997a21..7f64699a 100644 --- a/src/cmd/partition.rs +++ b/src/cmd/partition.rs @@ -135,7 +135,7 @@ impl Args { } } -type BoxedWriter = csv::Writer>; +type BoxedWriter = csv::Writer>; /// Generates unique filenames based on CSV values. struct WriterGenerator { diff --git a/src/cmd/split.rs b/src/cmd/split.rs index 0e597ee5..eb22caca 100644 --- a/src/cmd/split.rs +++ b/src/cmd/split.rs @@ -128,7 +128,7 @@ impl Args { &self, headers: &csv::ByteRecord, start: usize, - ) -> CliResult>> { + ) -> CliResult>> { let dir = Path::new(&self.arg_outdir); let path = dir.join(self.flag_filename.filename(&format!("{}", start))); let spath = Some(path.display().to_string()); diff --git a/src/config.rs b/src/config.rs index 1816fa1c..84e98190 100644 --- a/src/config.rs +++ b/src/config.rs @@ -194,12 +194,12 @@ impl Config { } pub fn writer(&self) - -> io::Result>> { + -> io::Result>> { Ok(self.from_writer(self.io_writer()?)) } pub fn reader(&self) - -> io::Result>> { + -> io::Result>> { Ok(self.from_reader(self.io_reader()?)) } @@ -260,7 +260,7 @@ impl Config { } } - pub fn io_reader(&self) -> io::Result> { + pub fn io_reader(&self) -> io::Result> { Ok(match self.path { None => Box::new(io::stdin()), Some(ref p) => { @@ -290,7 +290,7 @@ impl Config { .from_reader(rdr) } - pub fn io_writer(&self) -> io::Result> { + pub fn io_writer(&self) -> io::Result> { Ok(match self.path { None => Box::new(io::stdout()), Some(ref p) => Box::new(fs::File::create(p)?), diff --git a/src/util.rs b/src/util.rs index c5086ff7..ce257417 100644 --- a/src/util.rs +++ b/src/util.rs @@ -187,7 +187,7 @@ impl FilenameTemplate { /// that we do not output headers; the caller must do that if /// desired. pub fn writer

(&self, path: P, unique_value: &str) - -> io::Result>> + -> io::Result>> where P: AsRef { let filename = self.filename(unique_value); diff --git a/tests/tests.rs b/tests/tests.rs index 37966bc7..70cd1e11 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -102,7 +102,7 @@ impl Arbitrary for CsvRecord { CsvRecord((0..size).map(|_| Arbitrary::arbitrary(g)).collect()) } - fn shrink(&self) -> Box+'static> { + fn shrink(&self) -> Box+'static> { Box::new(self.clone().unwrap() .shrink().filter(|r| r.len() > 0).map(CsvRecord)) } @@ -148,7 +148,7 @@ impl Arbitrary for CsvData { } } - fn shrink(&self) -> Box+'static> { + fn shrink(&self) -> Box+'static> { let len = if self.is_empty() { 0 } else { self[0].len() }; let mut rows: Vec = self.clone() diff --git a/tests/workdir.rs b/tests/workdir.rs index 111ade33..6a4c2971 100644 --- a/tests/workdir.rs +++ b/tests/workdir.rs @@ -14,7 +14,7 @@ use Csv; static XSV_INTEGRATION_TEST_DIR: &'static str = "xit"; -static NEXT_ID: atomic::AtomicUsize = atomic::ATOMIC_USIZE_INIT; +static NEXT_ID: atomic::AtomicUsize = atomic::AtomicUsize::new(0); pub struct Workdir { root: PathBuf,