This commit is contained in:
Stephan Dilly 2021-05-07 11:40:34 +02:00
parent f836d01492
commit 386a31067f
3 changed files with 5 additions and 9 deletions

View File

@ -5,13 +5,11 @@
#![deny(unused_imports)]
#![deny(unused_must_use)]
#![deny(dead_code)]
#![deny(clippy::all)]
#![deny(clippy::all, clippy::perf, clippy::nursery, clippy::pedantic)]
#![deny(clippy::filetype_is_file)]
#![deny(clippy::cargo)]
#![deny(clippy::pedantic)]
#![deny(clippy::nursery)]
#![deny(clippy::unwrap_used)]
#![deny(clippy::panic)]
#![deny(clippy::perf)]
#![deny(clippy::match_like_matches_macro)]
#![deny(clippy::needless_update)]
#![allow(clippy::module_name_repetitions)]

View File

@ -342,7 +342,7 @@ fn new_file_content(path: &Path) -> Option<Vec<u8>> {
path.to_str()?.to_string().as_bytes().into(),
);
}
} else if meta.file_type().is_file() {
} else if !meta.file_type().is_dir() {
if let Ok(content) = fs::read(path) {
return Some(content);
}

View File

@ -2,11 +2,9 @@
#![deny(unused_imports)]
#![deny(unused_must_use)]
#![deny(dead_code)]
#![deny(clippy::all)]
#![deny(clippy::all, clippy::perf, clippy::nursery, clippy::pedantic)]
#![deny(clippy::filetype_is_file)]
#![deny(clippy::cargo)]
#![deny(clippy::pedantic)]
#![deny(clippy::perf)]
#![deny(clippy::nursery)]
#![deny(clippy::unwrap_used)]
#![deny(clippy::panic)]
#![deny(clippy::match_like_matches_macro)]