From 2c8439bc1e8118225c8ba4d64658c1c6b2182937 Mon Sep 17 00:00:00 2001 From: KNnut <9387720+KNnut@users.noreply.github.com> Date: Fri, 13 Nov 2020 06:17:31 +0800 Subject: refactor(cli+core): various cleanups in Rust (#8336) --- cli/bench/main.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cli/bench') diff --git a/cli/bench/main.rs b/cli/bench/main.rs index 0b8f9aa7b..de19ceda8 100644 --- a/cli/bench/main.rs +++ b/cli/bench/main.rs @@ -183,10 +183,10 @@ fn get_binary_sizes(target_dir: &PathBuf) -> Result { // Because cargo's OUT_DIR is not predictable, search the build tree for // snapshot related files. for file in walkdir::WalkDir::new(target_dir) { - if file.is_err() { - continue; - } - let file = file.unwrap(); + let file = match file { + Ok(file) => file, + Err(_) => continue, + }; let filename = file.file_name().to_str().unwrap().to_string(); if !BINARY_TARGET_FILES.contains(&filename.as_str()) { -- cgit v1.2.3