Skip to content

Commit 33a736e

Browse files
committed
fix(mkdir): replace panic! with assert! in concurrent test
- Fix clippy manual_assert warning - Use assert! instead of if !success { panic! } - Format assert! call according to rustfmt requirements - Maintains same error message and behavior - Passes clippy pedantic checks
1 parent d25ff03 commit 33a736e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/by-util/test_mkdir.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -788,9 +788,11 @@ fn test_mkdir_concurrent_creation() {
788788

789789
match result {
790790
Ok(output) => {
791-
if !output.status.success() {
792-
panic!("mkdir failed: {}", String::from_utf8_lossy(&output.stderr));
793-
}
791+
assert!(
792+
output.status.success(),
793+
"mkdir failed: {}",
794+
String::from_utf8_lossy(&output.stderr)
795+
);
794796
}
795797
Err(e) => panic!("Failed to execute mkdir: {e}"),
796798
}

0 commit comments

Comments
 (0)