diff options
Diffstat (limited to 'cli/bench/main.rs')
-rw-r--r-- | cli/bench/main.rs | 8 |
1 files changed, 4 insertions, 4 deletions
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<Value> { // 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()) { |