Fixed clippy warnings (#90)

* Fixed clippy warnings

* Fix as per review
This commit is contained in:
boyned//Kampfkarren
2018-12-03 10:35:40 -08:00
committed by Lucien Greathouse
parent 26a7bb9746
commit 13a7c1ba81
7 changed files with 31 additions and 47 deletions

View File

@@ -192,15 +192,12 @@ impl Project {
} else if location_metadata.is_dir() {
let with_file = start_location.join(PROJECT_FILENAME);
match fs::metadata(&with_file) {
Ok(with_file_metadata) => {
if with_file_metadata.is_file() {
return Some(with_file);
} else {
return None;
}
},
Err(_) => {},
if let Ok(with_file_metadata) = fs::metadata(&with_file) {
if with_file_metadata.is_file() {
return Some(with_file);
} else {
return None;
}
}
}