clippy: Disallow Path::exists().
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)