Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass through stream_position in ProgressBarIter #309

Merged
merged 1 commit into from Sep 15, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/iter.rs
Expand Up @@ -134,6 +134,11 @@ impl<S: io::Seek> io::Seek for ProgressBarIter<S> {
pos
})
}
// Pass this through to preserve optimizations that the inner I/O object may use here
// Also avoid sending a set_position update when the position hasn't changed
fn stream_position(&mut self) -> io::Result<u64> {
self.it.stream_position()
}
}

impl<W: io::Write> io::Write for ProgressBarIter<W> {
Expand Down