From 636e674ee7262c6303b637ffe09776e0affd0c6f Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Sat, 26 Sep 2020 10:09:51 +0200 Subject: [PATCH] src/client/pull.rs: simplify code --- src/client/pull.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/client/pull.rs b/src/client/pull.rs index e92d2622..94143d61 100644 --- a/src/client/pull.rs +++ b/src/client/pull.rs @@ -50,13 +50,12 @@ async fn pull_index_chunks( }) ); - let target2 = target.clone(); let verify_pool = ParallelHandler::new( "sync chunk writer", 4, - move |(chunk, digest, size): (DataBlob, [u8;32], u64)| { + |(chunk, digest, size): (DataBlob, [u8;32], u64)| { // println!("verify and write {}", proxmox::tools::digest_to_hex(&digest)); chunk.verify_unencrypted(size as usize, &digest)?; - target2.insert_chunk(&chunk, &digest)?; + target.insert_chunk(&chunk, &digest)?; Ok(()) } );