Commit ebc3bcab authored by Andrew Jones's avatar Andrew Jones
Browse files

Fix ManifestPath compiler errors

parent 819a5bfa
......@@ -95,7 +95,7 @@ impl CrateMetadata {
fn get_cargo_metadata(manifest_path: &ManifestPath) -> Result<(CargoMetadata, Package)> {
let mut cmd = MetadataCommand::new();
let metadata = cmd
.manifest_path(manifest_path)
.manifest_path(manifest_path.as_ref())
.exec()
.context("Error invoking `cargo metadata`")?;
let root_package_id = metadata
......
......@@ -88,6 +88,12 @@ impl AsRef<Path> for ManifestPath {
}
}
impl From<ManifestPath> for PathBuf {
fn from(path: ManifestPath) -> Self {
path.path
}
}
/// Create, amend and save a copy of the specified `Cargo.toml`.
pub struct Manifest {
path: ManifestPath,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment