mirror of
https://github.com/dtolnay/cargo-expand.git
synced 2025-04-04 05:17:37 +03:00
Format PR 185 with rustfmt
This commit is contained in:
parent
265e59d353
commit
cfbcc88b74
1 changed files with 8 additions and 6 deletions
14
src/main.rs
14
src/main.rs
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue