Skip to content
Snippets Groups Projects
Commit 64ea29f6 authored by bjorn3's avatar bjorn3
Browse files

Remove ProgressBarWrite

It is unused.
parent 5fed46f9
No related branches found
No related tags found
No related merge requests found
...@@ -23,29 +23,3 @@ impl<'p, 'r, P: Write, R: Read> Read for ProgressBarRead<'p, 'r, P, R> { ...@@ -23,29 +23,3 @@ impl<'p, 'r, P: Write, R: Read> Read for ProgressBarRead<'p, 'r, P, R> {
Ok(count) Ok(count)
} }
} }
pub struct ProgressBarWrite<'p, 'w, P: Write + 'p, W: Write + 'w> {
pb: &'p mut ProgressBar<P>,
w: &'w mut W,
}
impl<'p, 'w, P: Write, W: Write> ProgressBarWrite<'p, 'w, P, W> {
pub fn _new(pb: &'p mut ProgressBar<P>, w: &'w mut W) -> ProgressBarWrite<'p, 'w, P, W> {
ProgressBarWrite {
pb,
w
}
}
}
impl<'p, 'w, P: Write, W: Write> Write for ProgressBarWrite<'p, 'w, P, W> {
fn write(&mut self, buf: &[u8]) -> Result<usize> {
let count = self.w.write(buf)?;
self.pb.add(count as u64);
Ok(count)
}
fn flush(&mut self) -> Result<()> {
self.w.flush()
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment