From 79ea68a749403aa0599a864961aa8fbfdc6f7ccf Mon Sep 17 00:00:00 2001 From: Greg Soltis Date: Tue, 23 May 2023 19:36:35 -0700 Subject: [PATCH] cfg block --- crates/globwalk/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/globwalk/src/lib.rs b/crates/globwalk/src/lib.rs index 771cd52eba2aad..9400fbf65cde6f 100644 --- a/crates/globwalk/src/lib.rs +++ b/crates/globwalk/src/lib.rs @@ -415,7 +415,8 @@ mod test { std::fs::File::create(tmp.path().join(file)).unwrap(); } - if cfg!(unix) { + #[cfg(unix)] + { // these files/symlinks won't work on Windows std::fs::File::create(tmp.path().join("-")).unwrap(); std::fs::File::create(tmp.path().join("]")).unwrap();