diff options
author | KNnut <9387720+KNnut@users.noreply.github.com> | 2020-11-13 06:17:31 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-13 09:17:31 +1100 |
commit | 2c8439bc1e8118225c8ba4d64658c1c6b2182937 (patch) | |
tree | c3dde90a1bfbc2aba0bf993af8dc58d49444d1a4 /cli/bench/main.rs | |
parent | a52d8839218e75311384fa8095d4cfde533ad923 (diff) |
refactor(cli+core): various cleanups in Rust (#8336)
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()) { |