Skip to content

Commit d165533

Browse files
Nathan Suttontopecongiro
Nathan Sutton
authored andcommitted
Improve error message when failing cargo metadata (rust-lang#3024)
1 parent 68ede7b commit d165533

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/cargo-fmt/main.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -373,9 +373,6 @@ fn run_rustfmt(
373373
fn get_cargo_metadata(manifest_path: Option<&Path>) -> Result<cargo_metadata::Metadata, io::Error> {
374374
match cargo_metadata::metadata(manifest_path) {
375375
Ok(metadata) => Ok(metadata),
376-
Err(..) => Err(io::Error::new(
377-
io::ErrorKind::Other,
378-
"`cargo manifest` failed.",
379-
)),
376+
Err(error) => Err(io::Error::new(io::ErrorKind::Other, error.to_string())),
380377
}
381378
}

0 commit comments

Comments
 (0)