diff options
| author | aur-build <aur-build@localhost> | 2026-11-19 20:37:35 +0000 |
|---|---|---|
| committer | aur-build <aur-build@localhost> | 2026-11-19 20:37:35 +0000 |
| commit | 8a612ab7a62cf7ee48f45795b8b6760d2cabe76f (patch) | |
| tree | 37ac1d70cd885cbde6013c42c5c8c76e3d6ceed9 /tests/common/mod.rs | |
| parent | ed70a288033248b707c0a01acfecf320e260cfbe (diff) | |
| download | aur-build-8a612ab7a62cf7ee48f45795b8b6760d2cabe76f.tar.gz aur-build-8a612ab7a62cf7ee48f45795b8b6760d2cabe76f.zip | |
fix: what clippy -D warnings was holding
Sandbox::default was a hand-written derivable_impl, and copy_tree borrowed an
owned PathBuf.
Diffstat (limited to 'tests/common/mod.rs')
| -rw-r--r-- | tests/common/mod.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/common/mod.rs b/tests/common/mod.rs index 5489cfa..4884a19 100644 --- a/tests/common/mod.rs +++ b/tests/common/mod.rs @@ -425,11 +425,12 @@ fn copy_tree(from: &Path, to: &Path) { std::fs::create_dir_all(to).unwrap(); for entry in std::fs::read_dir(from).unwrap() { let entry = entry.unwrap(); + let path = entry.path(); let target = to.join(entry.file_name()); if entry.file_type().unwrap().is_dir() { - copy_tree(&entry.path(), &target); + copy_tree(&path, &target); } else { - std::fs::copy(&entry.path(), &target).unwrap(); + std::fs::copy(&path, &target).unwrap(); } } } |
