From 909d8ad1a86ef1b3b68260d7d57d983b457087b3 Mon Sep 17 00:00:00 2001 From: Steve Klabnik Date: Wed, 12 Jul 2023 18:14:07 -0500 Subject: [PATCH] unwrap instead of let _ I really prefer using at least unwrap here. If this never happens, they're equivalent, but if it does happen, with the old code, you silently continue, and with the new code, you blow up. --- crates/tarball/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/tarball/src/lib.rs b/crates/tarball/src/lib.rs index 79473fb1c..e80d7f0be 100644 --- a/crates/tarball/src/lib.rs +++ b/crates/tarball/src/lib.rs @@ -45,7 +45,7 @@ pub async fn download_and_extract( let tar_gz = File::open(&tarball_location).unwrap(); let tar = GzDecoder::new(tar_gz); let mut archive = Archive::new(tar); - let _ = archive.unpack(&extract_location); + archive.unpack(&extract_location).unwrap(); std::fs::remove_file(&tarball_location) .or(Err(TarballError::FileSystem("removing tarball failed".to_owned())))