From b0a586c4a698923a6df54355a4840f915a35ce42 Mon Sep 17 00:00:00 2001 From: Remi Bernotavicius Date: Thu, 5 Dec 2024 22:58:34 -0800 Subject: [PATCH] Fix bug with UploadProgressReader --- crates/maelstrom-client-process/src/progress.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/crates/maelstrom-client-process/src/progress.rs b/crates/maelstrom-client-process/src/progress.rs index 331c8210..60ac6098 100644 --- a/crates/maelstrom-client-process/src/progress.rs +++ b/crates/maelstrom-client-process/src/progress.rs @@ -41,7 +41,7 @@ where } } -#[derive(Clone, Debug)] +#[derive(Debug)] pub struct RunningProgress { name: String, progress: Arc, @@ -125,13 +125,16 @@ impl ProgressTracker { #[derive(Clone, Debug)] pub struct UploadProgressReader { - prog: RunningProgress, + prog: Arc, read: ReadT, } impl UploadProgressReader { pub fn new(prog: RunningProgress, read: ReadT) -> Self { - Self { prog, read } + Self { + prog: Arc::new(prog), + read, + } } }