src/client/pull.rs: simplify code
This commit is contained in:
parent
b02b374b46
commit
636e674ee7
@ -50,13 +50,12 @@ async fn pull_index_chunks<I: IndexFile>(
|
||||
})
|
||||
);
|
||||
|
||||
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(())
|
||||
}
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user