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 b475c93 commit 0b3b0f5Copy full SHA for 0b3b0f5
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