mirror of
https://github.com/ouch-org/ouch.git
synced 2025-06-05 02:55:31 +00:00
cargo clippy
This commit is contained in:
parent
839848f3ca
commit
d86541b94b
@ -1,4 +1,4 @@
|
||||
use std::{ffi::OsStr, path::Path};
|
||||
use std::path::Path;
|
||||
|
||||
/// Determines which files should be read or ignored during directory walking
|
||||
pub struct FileVisibilityPolicy {
|
||||
@ -78,7 +78,7 @@ impl FileVisibilityPolicy {
|
||||
.hidden(self.read_hidden);
|
||||
|
||||
if self.read_git_ignore {
|
||||
builder.filter_entry(|p| p.path().file_name() != Some(OsStr::new(".git")));
|
||||
builder.filter_entry(|p| p.path().file_name().is_some_and(|name| name != ".git"));
|
||||
}
|
||||
|
||||
builder.build()
|
||||
|
@ -475,7 +475,7 @@ fn no_git_folder_after_decompression_with_gitignore_flag_active() {
|
||||
let dir_path = dir.path();
|
||||
|
||||
let before = dir_path.join("before");
|
||||
|
||||
|
||||
let decompressed = dir_path.join("decompressed");
|
||||
|
||||
// Create directory and a dummy file
|
||||
|
Loading…
x
Reference in New Issue
Block a user