We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d3cb516 commit 72b5ce2Copy full SHA for 72b5ce2
src/test_util.rs
@@ -170,11 +170,9 @@ pub fn target_path(target_name: &str) -> std::io::Result<PathBuf> {
170
if let Some(cands) = target_dir_cands() {
171
for dir in cands {
172
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
- }
+ for entry in iter.flatten() {
+ if entry.file_name() == target_name {
+ return Ok(entry.path());
178
}
179
180
0 commit comments