Skip to content

Commit 0d2b78a

Browse files
committed
Improve comments
1 parent 57ebf0d commit 0d2b78a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugins/upload/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,13 @@ async fn download(
104104
let progress_speed_clone = Arc::clone(&progress_speed);
105105
let accumulated_progress_clone = Arc::clone(&accumulated_progress);
106106

107-
// Spawn a thread that runs on timely manner to update relative progress
107+
// Spawn a thread that runs on timely manner to update progress speed
108108
let _progress_thread = thread::spawn(move || {
109109
loop {
110110
{
111111
let mut progress_speed = progress_speed_clone.lock().unwrap();
112112
let mut accumulated_progress = accumulated_progress_clone.lock().unwrap();
113-
*progress_speed = *accumulated_progress;
113+
*progress_speed = *accumulated_progress; // Set the speed to the accumulated progress
114114
*accumulated_progress = 0; // Reset the accumulated progress every second
115115
}
116116
thread::sleep(Duration::from_secs(1));

0 commit comments

Comments
 (0)