ls: Fix clippy warning

This commit is contained in:
Anup Mahindre 2021-06-21 20:29:22 +05:30 committed by GitHub
parent ffb6b7152f
commit 4b3224dd82
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1198,7 +1198,7 @@ fn list(locs: Vec<String>, config: Config) -> i32 {
let p = PathBuf::from(&loc);
let path_data = PathData::new(p, None, None, &config, true);
if !path_data.md().is_some() {
if path_data.md().is_none() {
show_error!("'{}': {}", &loc, "No such file or directory");
/*
We found an error, the return code of ls should not be 0