rustfmt
rustfmt copied to clipboard
Handle Cargo.toml manifests that are symlinks
The canonicalize() function resolves symlinks, which would cause targets whose "Cargo.toml" is a symlink to be filtered out. This would cause cargo-fmt to print an error "Failed to find targets".
Resolves #6184
To keep the logic more tolerant, I added an extra comparison of file paths without a call to canonicalize() and left the original canonicalize() comparison, but is the canonicalize() ever actually needed?
Do some platforms/OS/filesystems require canonicalize()?
Perhaps Windows paths with backslashes?