@@ -8,7 +8,7 @@ disallowed-macros = [
88 { path = " std::dbg" , reason = " it is okay to use during development, but please do not include it in main branch" },
99]
1010disallowed-methods = [
11- # Since we are using fs-err crate (as `fs`), `fs::*` functions will output a better error .
11+ # For better error messages, we use crate::fs for bin/lib and fs-err crate (imported as `fs`) for test .
1212 { path = " std::fs::canonicalize" , replacement = " fs::canonicalize" },
1313 { path = " std::fs::copy" , replacement = " fs::copy" },
1414 { path = " std::fs::create_dir_all" , replacement = " fs::create_dir_all" },
@@ -27,16 +27,23 @@ disallowed-methods = [
2727 { path = " std::fs::set_permissions" , replacement = " fs::set_permissions" },
2828 { path = " std::fs::symlink_metadata" , replacement = " fs::symlink_metadata" },
2929 { path = " std::fs::write" , replacement = " fs::write" },
30+ # { path = "std::os::unix::fs::symlink", replacement = "fs::os::unix::fs::symlink" },
31+ # { path = "std::os::windows::fs::symlink_dir", replacement = "fs::os::windows::fs::symlink_dir" },
32+ # { path = "std::os::windows::fs::symlink_file", replacement = "fs::os::windows::fs::symlink_file" },
3033 { path = " std::path::Path::canonicalize" , replacement = " fs::canonicalize" },
3134 { path = " std::path::Path::metadata" , replacement = " fs::metadata" },
3235 { path = " std::path::Path::read_dir" , replacement = " fs::read_dir" },
3336 { path = " std::path::Path::read_link" , replacement = " fs::read_link" },
3437 { path = " std::path::Path::symlink_metadata" , replacement = " fs::symlink_metadata" },
3538]
3639disallowed-types = [
37- # Since we are using fs-err crate (as `fs`), `fs::*` types will output a better error .
40+ # For better error messages, we use crate::fs for bin/lib and fs-err crate (imported as `fs`) for test .
3841 { path = " std::fs::DirEntry" , replacement = " fs::DirEntry" },
3942 { path = " std::fs::File" , replacement = " fs::File" },
4043 { path = " std::fs::OpenOptions" , replacement = " fs::OpenOptions" },
4144 { path = " std::fs::ReadDir" , replacement = " fs::ReadDir" },
45+ # { path = "std::os::unix::fs::FileExt", replacement = "fs::os::unix::fs::FileExt" },
46+ # { path = "std::os::unix::fs::OpenOptionsExt", replacement = "fs::os::unix::fs::OpenOptionsExt" },
47+ # { path = "std::os::windows::fs::FileExt", replacement = "fs::os::windows::fs::FileExt" },
48+ # { path = "std::os::windows::fs::OpenOptionsExt", replacement = "fs::os::windows::fs::OpenOptionsExt" },
4249]
0 commit comments