lint: Clarify rmtree/remove_all error message with preferred alternatives

This commit is contained in:
MarcoFalke
2026-04-01 10:24:32 +02:00
parent 8e789322c5
commit fa955af618
3 changed files with 6 additions and 4 deletions

View File

@@ -139,7 +139,8 @@ pub fn lint_remove_all() -> LintResult {
.success();
if found {
Err(r#"
Use of fs::remove_all or std::filesystem::remove_all is dangerous and should be avoided.
Use of fs::remove_all or std::filesystem::remove_all is dangerous and should be avoided. If removal
is required, prefer fs::remove.
"#
.trim()
.to_string())