Skip to content

Commit

Permalink
Merge pull request rust-lang#717 from Eijebong/metadata
Browse files Browse the repository at this point in the history
Update cargo_metadata to 0.7
  • Loading branch information
RalfJung authored Apr 27, 2019
2 parents 0f0c5f6 + 69a252c commit 048ce3c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ required-features = ["rustc_tests"]

[dependencies]
byteorder = { version = "1.1", features = ["i128"]}
cargo_metadata = { version = "0.6", optional = true }
cargo_metadata = { version = "0.7", optional = true }
directories = { version = "1.0", optional = true }
rustc_version = { version = "0.2.3", optional = true }
env_logger = "0.6"
Expand Down
9 changes: 5 additions & 4 deletions src/bin/cargo-miri.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,11 @@ fn list_targets() -> impl Iterator<Item=cargo_metadata::Target> {
Path::new(&m).canonicalize().unwrap()
);

let mut metadata = if let Ok(metadata) = cargo_metadata::metadata(
manifest_path.as_ref().map(AsRef::as_ref),
)
{
let mut cmd = cargo_metadata::MetadataCommand::new();
if let Some(ref manifest_path) = manifest_path {
cmd.manifest_path(manifest_path);
}
let mut metadata = if let Ok(metadata) = cmd.exec() {
metadata
} else {
show_error(format!("Could not obtain Cargo metadata"));
Expand Down

0 comments on commit 048ce3c

Please sign in to comment.