From 5dca65fa0992bedb826aa7a762dc69e1beaed2de Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 9 Jan 2019 00:12:16 -0800 Subject: some clippy nits --- rust/src/bin/fatcat-export.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'rust/src/bin') diff --git a/rust/src/bin/fatcat-export.rs b/rust/src/bin/fatcat-export.rs index 889d7dff..157070e5 100644 --- a/rust/src/bin/fatcat-export.rs +++ b/rust/src/bin/fatcat-export.rs @@ -1,5 +1,8 @@ //! JSON Export Helper +// using closures as a Result/? hack +#![allow(clippy::redundant_closure_call)] + #[macro_use] extern crate clap; #[macro_use] @@ -100,7 +103,7 @@ fn loop_printer( let mut buf_output = BufWriter::new(output); for line in output_receiver { buf_output.write_all(&line.into_bytes())?; - buf_output.write(b"\n")?; + buf_output.write_all(b"\n")?; buf_output.flush()?; } drop(done_sender); @@ -108,7 +111,7 @@ fn loop_printer( } fn parse_line(s: &str) -> Result { - let fields: Vec = s.split("\t").map(|v| v.to_string()).collect(); + let fields: Vec = s.split('\t').map(|v| v.to_string()).collect(); if fields.len() != 3 { bail!("Invalid input line"); } -- cgit v1.2.3