Skip to content

clippy: Disallow Path::exists().

gabi-250 requested to merge gabi-250/arti:forbid-path-exists into main

Path::exists() is dangerous because it returns false instead of an error if the path's metadata can't be accessed (so if the path exists but is not accessible because the user doesn't have the right permissions, it will return false, which not quite right).

This adds Path::exists() to disallowed-methods and replaces all occurrences of Path::exists() with Path::try_exists().

Closes #1493 (closed)

Merge request reports

Loading