From 72b5ce2fc6e9180e86ca528b8cf8b7269d8c5db5 Mon Sep 17 00:00:00 2001 From: JyJyJcr <82190170+JyJyJcr@users.noreply.github.com> Date: Sun, 7 Apr 2024 22:04:40 +0900 Subject: [PATCH] fix: remove clippy --- src/test_util.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/test_util.rs b/src/test_util.rs index 08806ed..91006fd 100644 --- a/src/test_util.rs +++ b/src/test_util.rs @@ -170,11 +170,9 @@ pub fn target_path(target_name: &str) -> std::io::Result { if let Some(cands) = target_dir_cands() { for dir in cands { if let Ok(iter) = read_dir(dir) { - for entry in iter { - if let Ok(entry) = entry { - if entry.file_name() == target_name { - return Ok(entry.path()); - } + for entry in iter.flatten() { + if entry.file_name() == target_name { + return Ok(entry.path()); } } }