Skip to content
Myr

Further simplify the code

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by sharkdp · committed by David Peter · parent 8cea65c · Browse files · 1 file+5 added−6 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+5 added−6 removed

  • other:+5 added−6 removed

1 file+5 added−6 removed

modified:src/walk.rs+5 added-6 removed
59 unmodified lines
60 WorkerResult::Entry(value) => return Ok(value),61 WorkerResult::Error(ignore_error) => {62 if let ignore::Error::WithPath { path, err } = &ignore_error {63 if let ignore::Error::Io(ref io_err) = **err {64 if io_err.kind() == io::ErrorKind::NotFound {65 if let Ok(metadata) = fs::symlink_metadata(&path) {66 if metadata.file_type().is_symlink() {67 return Ok(path.to_path_buf());68 }69 }64 if io_err.kind() == io::ErrorKind::NotFound65 && fs::symlink_metadata(&path)66 .map_or(false, |m| m.file_type().is_symlink())67 {68 return Ok(path.to_path_buf());69 }70 }71 }72 return Err(ignore_error);
347 unmodified lines