Skip to content

Commit

Permalink
Fix bug with UploadProgressReader
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbobbio committed Dec 6, 2024
1 parent dfb5cd4 commit b0a586c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions crates/maelstrom-client-process/src/progress.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ where
}
}

#[derive(Clone, Debug)]
#[derive(Debug)]
pub struct RunningProgress {
name: String,
progress: Arc<AtomicU64>,
Expand Down Expand Up @@ -125,13 +125,16 @@ impl ProgressTracker {

#[derive(Clone, Debug)]
pub struct UploadProgressReader<ReadT> {
prog: RunningProgress,
prog: Arc<RunningProgress>,
read: ReadT,
}

impl<ReadT> UploadProgressReader<ReadT> {
pub fn new(prog: RunningProgress, read: ReadT) -> Self {
Self { prog, read }
Self {
prog: Arc::new(prog),
read,
}
}
}

Expand Down

0 comments on commit b0a586c

Please sign in to comment.