From c4c0ad2e12e9a1272cc0b4eddfcec8cb8ec3067f Mon Sep 17 00:00:00 2001 From: ScuroNeko Date: Fri, 17 Oct 2025 14:04:34 +0300 Subject: [PATCH] small fix in hash from zsdiff --- src/zsdiff.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/zsdiff.rs b/src/zsdiff.rs index 2da3be5..f919e89 100644 --- a/src/zsdiff.rs +++ b/src/zsdiff.rs @@ -109,10 +109,11 @@ pub async fn zsdiff( utils::compress_parts(parts, &fs::File::create(output_filename)?, level).await; let output_data = fs::read(output_filename)?; let size_after = output_data.len(); - let output_hash = format!("{} {}", get_hash(output_data).await, output_filename); + let hash = get_hash(output_data).await; + let output_hash = format!("{} {}", hash.clone(), output_filename); fs::File::create(format!("{}.md5", output_filename))?.write_all(output_hash.as_bytes())?; let elapsed = now.elapsed(); - println!("Zsdiff hash: {}", output_hash); + println!("Zsdiff hash: {}", hash); println!("Size before: {:.1?}KB", size_before / 1024); println!("Size after: {:.1?}KB", size_after / 1024); println!(