Structured access to the output of cargo metadata
Usually used from within a cargo-*
executable
let manifest_path_arg = args.skip.find;
let mut metadata = metadata.unwrap;
Structured access to the output of cargo metadata
Usually used from within a cargo-*
executable
let manifest_path_arg = std::env::args().skip(2).find(|val| val.starts_with("--manifest-path="));
let mut metadata = cargo::metadata(manifest_path_arg.as_ref().map(AsRef::as_ref)).unwrap();