From d2e4cb85af2c6101cd435c10cfd3d4084cd83e76 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Thu, 18 Jun 2026 00:50:06 +0800 Subject: refactor: use `io::Error::other` and simplify closures --- rola-utils/functions/src/test_sandbox.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'rola-utils/functions/src/test_sandbox.rs') 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())?; } } } -- cgit