From 6711ac91a845d1d4b9482f63e4bc065f8d9e1edc Mon Sep 17 00:00:00 2001 From: Jack Fletcher Date: Wed, 26 Jan 2022 22:21:17 +0000 Subject: [PATCH] Fix linter warnings --- tests/end_to_end.rs | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/tests/end_to_end.rs b/tests/end_to_end.rs index 51daebad..4f938345 100644 --- a/tests/end_to_end.rs +++ b/tests/end_to_end.rs @@ -157,17 +157,14 @@ fn check_zip_contents( ) { let mut archive = read_zip(zip_file).unwrap(); - match expected_method { - Some(method) => { - let file = archive.by_name(name).unwrap(); + if let Some(expected_method) = expected_method { + let file = archive.by_name(name).unwrap(); + let real_method = file.compression(); - assert_eq!( - method, - file.compression(), - "File does not have expected compression method" - ) - } - None => {} + assert_eq!( + expected_method, real_method, + "File does not have expected compression method" + ); } check_zip_file_contents(&mut archive, name);