]> git.proxmox.com Git - proxmox-backup.git/commitdiff
parallel_handler: explicit Arc::clone
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Mon, 28 Sep 2020 07:44:37 +0000 (09:44 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Mon, 28 Sep 2020 11:40:03 +0000 (13:40 +0200)
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
src/tools/parallel_handler.rs

index 199bb97f91a89c03f40edf5c93db88d174e45561..99630bc26f2409f350b0b3df4498f167d67cc0db 100644 (file)
@@ -49,7 +49,7 @@ impl<I> Clone for SendHandle<I> {
     fn clone(&self) -> Self {
         Self {
             input: self.input.clone(),
-            abort: self.abort.clone(),
+            abort: Arc::clone(&self.abort),
         }
     }
 }
@@ -67,7 +67,7 @@ impl<'a, I: Send + 'static> ParallelHandler<'a, I> {
 
         for i in 0..threads {
             let input_rx = input_rx.clone();
-            let abort = abort.clone();
+            let abort = Arc::clone(&abort);
 
             // Erase the 'a lifetime bound. This is safe because we
             // join all thread in the drop handler.