Add deconstruct method to ProgressReader

This commit is contained in:
Alexandre Bury 2016-07-29 23:51:41 -07:00
parent 6e247efc1c
commit db9df3dfc9

View File

@ -25,6 +25,11 @@ impl<R: Read> ProgressReader<R> {
counter: counter,
}
}
/// Unwraps this `ProgressReader`, returning the reader and counter.
pub fn deconstruct(self) -> (R, Counter) {
(self.reader, self.counter)
}
}
impl<R: Read> Read for ProgressReader<R> {