Skip to content

Commit 0705a73

Browse files
committed
feat: add progress::AtomicStep to allow referring to it.
Previously, only `StepShared` was available, which implies an `Arc`.
1 parent 6b94f28 commit 0705a73

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/progress/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,11 @@ pub const UNKNOWN: Id = *b"\0\0\0\0";
3737
/// The amount of steps a progress can make
3838
pub type Step = usize;
3939

40+
/// The amount of steps a progress can make, for threadsafe counting.
41+
pub type AtomicStep = AtomicUsize;
42+
4043
/// As step, but shareable.
41-
pub type StepShared = Arc<AtomicUsize>;
44+
pub type StepShared = Arc<AtomicStep>;
4245

4346
/// Indicate whether a progress can or cannot be made.
4447
#[derive(Default, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Debug, Hash)]

0 commit comments

Comments
 (0)