Format PR 185 with rustfmt

This commit is contained in:
David Tolnay 2023-07-16 12:49:52 -07:00
parent 265e59d353
commit cfbcc88b74
No known key found for this signature in database
GPG key ID: F9BA143B95FF6D82

View file

@ -321,10 +321,10 @@ fn apply_args(cmd: &mut Command, args: &Expand, color: &Coloring, outfile: &Path
line.args(Some(default_run));
}
}
},
}
Err(err) => {
let _ = writeln!(io::stderr(), "WARNING: run cargo metadata fail: {}", err);
},
}
}
}
@ -505,13 +505,15 @@ fn get_color(args: &Expand, config: &Config) -> Coloring {
Coloring::Auto // default
}
fn cargo_metadata(manifest_path: &Option<PathBuf>) -> cargo_metadata::Result<cargo_metadata::Metadata> {
fn cargo_metadata(
manifest_path: &Option<PathBuf>,
) -> cargo_metadata::Result<cargo_metadata::Metadata> {
let mut cmd = cargo_metadata::MetadataCommand::new();
match manifest_path {
Some(manifest_path) => {
cmd.manifest_path(manifest_path);
},
None => {},
}
None => {}
}
cmd.exec()
}
}