Skip to content

Commit 72b5ce2

Browse files
committed
fix: remove clippy
1 parent d3cb516 commit 72b5ce2

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/test_util.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -170,11 +170,9 @@ pub fn target_path(target_name: &str) -> std::io::Result<PathBuf> {
170170
if let Some(cands) = target_dir_cands() {
171171
for dir in cands {
172172
if let Ok(iter) = read_dir(dir) {
173-
for entry in iter {
174-
if let Ok(entry) = entry {
175-
if entry.file_name() == target_name {
176-
return Ok(entry.path());
177-
}
173+
for entry in iter.flatten() {
174+
if entry.file_name() == target_name {
175+
return Ok(entry.path());
178176
}
179177
}
180178
}

0 commit comments

Comments
 (0)