From 77bd1098b35d44e39e3660cb04332e17ef9d3d7b Mon Sep 17 00:00:00 2001 From: Matthew Leach Date: Sat, 3 Sep 2022 18:49:24 +0100 Subject: [PATCH] Remove `write_all` from wrap_write By implementing `write_all` we loose granularity of progress updates that are captured from `write`. Therefore, remove this function. --- src/iter.rs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/iter.rs b/src/iter.rs index 3d64b9f1..952207fd 100644 --- a/src/iter.rs +++ b/src/iter.rs @@ -287,12 +287,6 @@ impl io::Write for ProgressBarIter { self.it.flush() } - fn write_all(&mut self, buf: &[u8]) -> io::Result<()> { - self.it.write_all(buf).map(|()| { - self.progress.inc(buf.len() as u64); - }) - } - // write_fmt can not be captured with reasonable effort. // as it uses write_all internally by default that should not be a problem. // fn write_fmt(&mut self, fmt: fmt::Arguments) -> io::Result<()>;