Commit 20d958d
committed
correctly compare directory paths in
Previously, when running `cargo fmt --manifest-path Cargo.toml` from a
cargo workspace's root directory `cargo fmt` would error with a message
that read `Failed to find targets`.
The issue stemmed from an incorrect comparison between the path to the
workspace's root **directory** and the path to the specified
`Cargo.toml` **file**. This lead `cargo fmt` to incorrectly determine
that the command wasn't being run from the workspace's root.get_targets_root_only
1 parent 7cb2548 commit 20d958d
1 file changed
+7
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
364 | 364 | | |
365 | 365 | | |
366 | 366 | | |
| 367 | + | |
367 | 368 | | |
368 | 369 | | |
| 370 | + | |
| 371 | + | |
369 | 372 | | |
370 | | - | |
371 | | - | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
372 | 377 | | |
373 | 378 | | |
374 | 379 | | |
| |||
0 commit comments