diff --git a/asyncgit/src/lib.rs b/asyncgit/src/lib.rs index 1ed4a9cc..bfab69b7 100644 --- a/asyncgit/src/lib.rs +++ b/asyncgit/src/lib.rs @@ -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)] diff --git a/asyncgit/src/sync/diff.rs b/asyncgit/src/sync/diff.rs index d7558912..1fbbd937 100644 --- a/asyncgit/src/sync/diff.rs +++ b/asyncgit/src/sync/diff.rs @@ -342,7 +342,7 @@ fn new_file_content(path: &Path) -> Option> { 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); } diff --git a/src/main.rs b/src/main.rs index d63eb4b1..f326bc41 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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)]