Skip to content

Commit

Permalink
Fix ManifestPath compiler errors (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
ascjones authored Aug 14, 2020
1 parent 69e3e73 commit cfc389d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/crate_metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions src/workspace/manifest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit cfc389d

Please sign in to comment.