mirror of
https://github.com/ouch-org/ouch.git
synced 2025-06-05 02:55:31 +00:00
Silence invalid clippy lint (windows)
This commit is contained in:
parent
f847040e69
commit
c894829c37
@ -58,6 +58,8 @@ pub fn write_random_content(file: &mut impl Write, rng: &mut impl RngCore) {
|
||||
|
||||
// check that two directories have the exact same content recursively
|
||||
// checks equility of file types if preserve_permissions is true, ignored on non-unix
|
||||
// Silence clippy warning that triggers because of the `#[cfg(unix)]` on Windows.
|
||||
#[allow(clippy::only_used_in_recursion)]
|
||||
pub fn assert_same_directory(x: impl Into<PathBuf>, y: impl Into<PathBuf>, preserve_permissions: bool) {
|
||||
fn read_dir(dir: impl Into<PathBuf>) -> impl Iterator<Item = fs::DirEntry> {
|
||||
let mut dir: Vec<_> = fs::read_dir(dir).unwrap().map(|entry| entry.unwrap()).collect();
|
||||
|
Loading…
x
Reference in New Issue
Block a user