Skip to content

Commit 4f37eea

Browse files
committed
修复路径替换逻辑,确保在处理路径时将反斜杠替换为正斜杠,以提高跨平台兼容性。
1 parent 961132b commit 4f37eea

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

crates/test_utils/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,7 @@ is: {}
344344
let current_dir = current_dir().unwrap();
345345

346346
let res = res.replace(&current_dir.display().to_string(), ".");
347+
let res = res.replace('\\', "/");
347348

348349
f(&res);
349350

0 commit comments

Comments
 (0)