about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-07-05 09:17:27 +0000
committerGitHub <noreply@github.com>2020-07-05 09:17:27 +0000
commit6b74e27ba06d1f15ffca22020d72f0c170ec9680 (patch)
treea8390ab63e3038a99b88ff179abb6034bc35f25a
parent6c2f42260c35689647c30966a6ac8447a91c8871 (diff)
parent4be73c2b7f85b75be69bbe99ed4b1f82659a11c9 (diff)
downloadrust-6b74e27ba06d1f15ffca22020d72f0c170ec9680.tar.gz
rust-6b74e27ba06d1f15ffca22020d72f0c170ec9680.zip
Merge #5227
5227: AbsPath r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
-rw-r--r--crates/ra_project_model/src/cargo_workspace.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_project_model/src/cargo_workspace.rs b/crates/ra_project_model/src/cargo_workspace.rs
index 361fc8eea6a..04f7eb7412e 100644
--- a/crates/ra_project_model/src/cargo_workspace.rs
+++ b/crates/ra_project_model/src/cargo_workspace.rs
@@ -134,12 +134,12 @@ impl PackageData {
 
 impl CargoWorkspace {
     pub fn from_cargo_metadata(
-        cargo_toml: &Path,
+        cargo_toml: &AbsPath,
         cargo_features: &CargoConfig,
     ) -> Result<CargoWorkspace> {
         let mut meta = MetadataCommand::new();
         meta.cargo_path(ra_toolchain::cargo());
-        meta.manifest_path(cargo_toml);
+        meta.manifest_path(cargo_toml.to_path_buf());
         if cargo_features.all_features {
             meta.features(CargoOpt::AllFeatures);
         } else if cargo_features.no_default_features {
@@ -150,7 +150,7 @@ impl CargoWorkspace {
             meta.features(CargoOpt::SomeFeatures(cargo_features.features.clone()));
         }
         if let Some(parent) = cargo_toml.parent() {
-            meta.current_dir(parent);
+            meta.current_dir(parent.to_path_buf());
         }
         if let Some(target) = cargo_features.target.as_ref() {
             meta.other_options(vec![String::from("--filter-platform"), target.clone()]);