summaryrefslogtreecommitdiffstats
path: root/vendor/gix-features/src/progress.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 18:31:36 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 18:31:36 +0000
commite02c5b5930c2c9ba3e5423fe12e2ef0155017297 (patch)
treefd60ebbbb5299e16e5fca8c773ddb74f764760db /vendor/gix-features/src/progress.rs
parentAdding debian version 1.73.0+dfsg1-1. (diff)
downloadrustc-e02c5b5930c2c9ba3e5423fe12e2ef0155017297.tar.xz
rustc-e02c5b5930c2c9ba3e5423fe12e2ef0155017297.zip
Merging upstream version 1.74.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/gix-features/src/progress.rs')
-rw-r--r--vendor/gix-features/src/progress.rs20
1 files changed, 16 insertions, 4 deletions
diff --git a/vendor/gix-features/src/progress.rs b/vendor/gix-features/src/progress.rs
index 8d1e30bc4..6a8c9e1bd 100644
--- a/vendor/gix-features/src/progress.rs
+++ b/vendor/gix-features/src/progress.rs
@@ -6,8 +6,11 @@ pub use bytesize;
pub use prodash::{
self,
messages::MessageLevel,
- progress::{Discard, DoOrDiscard, Either, Id, Step, StepShared, Task, ThroughputOnDrop, Value, UNKNOWN},
- unit, Progress, RawProgress, Unit,
+ progress::{
+ AtomicStep, Discard, DoOrDiscard, Either, Id, Step, StepShared, Task, ThroughputOnDrop, Value, UNKNOWN,
+ },
+ unit, BoxedDynNestedProgress, Count, DynNestedProgress, DynNestedProgressToNestedProgress, NestedProgress,
+ Progress, Unit,
};
/// A stub for the portions of the `bytesize` crate that we use internally in `gitoxide`.
#[cfg(not(feature = "progress-unit-bytes"))]
@@ -77,7 +80,7 @@ pub fn steps() -> Option<Unit> {
Some(unit::dynamic(unit::Range::new("steps")))
}
-/// A structure passing every [`read`][std::io::Read::read()] call through to the contained Progress instance using [`inc_by(bytes_read)`][Progress::inc_by()].
+/// A structure passing every [`read`](std::io::Read::read()) call through to the contained Progress instance using [`inc_by(bytes_read)`](Count::inc_by()).
pub struct Read<T, P> {
/// The implementor of [`std::io::Read`] to which progress is added
pub inner: T,
@@ -111,7 +114,7 @@ where
}
}
-/// A structure passing every [`write`][std::io::Write::write()] call through to the contained Progress instance using [`inc_by(bytes_written)`][Progress::inc_by()].
+/// A structure passing every [`write`][std::io::Write::write()] call through to the contained Progress instance using [`inc_by(bytes_written)`](Count::inc_by()).
///
/// This is particularly useful if the final size of the bytes to write is known or can be estimated precisely enough.
pub struct Write<T, P> {
@@ -136,3 +139,12 @@ where
self.inner.flush()
}
}
+
+impl<T, P> io::Seek for Write<T, P>
+where
+ T: io::Seek,
+{
+ fn seek(&mut self, pos: io::SeekFrom) -> io::Result<u64> {
+ self.inner.seek(pos)
+ }
+}