diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-06-18 00:50:06 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-06-18 00:50:06 +0800 |
| commit | d2e4cb85af2c6101cd435c10cfd3d4084cd83e76 (patch) | |
| tree | 4458b402f79d9f0914f76c7e39d9521c9a5a9cd0 /rola-utils/functions/src/test_sandbox.rs | |
| parent | c796e3f93183fc1fdbd4aa68976fceb339aff8d8 (diff) | |
refactor: use `io::Error::other` and simplify closures
Diffstat (limited to 'rola-utils/functions/src/test_sandbox.rs')
| -rw-r--r-- | rola-utils/functions/src/test_sandbox.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rola-utils/functions/src/test_sandbox.rs b/rola-utils/functions/src/test_sandbox.rs index e0065f6..2705389 100644 --- a/rola-utils/functions/src/test_sandbox.rs +++ b/rola-utils/functions/src/test_sandbox.rs @@ -73,9 +73,9 @@ fn try_clear_contents(path: &Path) -> std::io::Result<()> { for entry in fs::read_dir(path)? { let entry = entry?; if entry.file_type()?.is_dir() { - fs::remove_dir_all(&entry.path())?; + fs::remove_dir_all(entry.path())?; } else { - fs::remove_file(&entry.path())?; + fs::remove_file(entry.path())?; } } } |
