From 43053b534aeadd7694c691a27620e8e8acc74ecc Mon Sep 17 00:00:00 2001 From: hdhoang Date: Wed, 14 Aug 2024 14:08:39 +0700 Subject: [PATCH] archive: address clippy Signed-off-by: Hoang Duc Hieu --- src/sync/archive.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/sync/archive.rs b/src/sync/archive.rs index 08fe3d3..6c083cb 100644 --- a/src/sync/archive.rs +++ b/src/sync/archive.rs @@ -97,16 +97,12 @@ impl<'a> Archive<'a> { .into() } _ => { - let tar_gz_dir = asset_name.strip_suffix(".tar.gz"); - match tar_gz_dir { - Some(tar_gz_dir) => Some(Archive { + asset_name.strip_suffix(".tar.gz").map(|tar_gz_dir| Archive { archive_path, tmp_dir, exe_name, archive_type: ArchiveType::TarGz(tar_gz_dir), - }), - None => None, - } + }) } } }