aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_project_model/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_project_model/src')
-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 361fc8eea..04f7eb741 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 {
134 134
135impl CargoWorkspace { 135impl CargoWorkspace {
136 pub fn from_cargo_metadata( 136 pub fn from_cargo_metadata(
137 cargo_toml: &Path, 137 cargo_toml: &AbsPath,
138 cargo_features: &CargoConfig, 138 cargo_features: &CargoConfig,
139 ) -> Result<CargoWorkspace> { 139 ) -> Result<CargoWorkspace> {
140 let mut meta = MetadataCommand::new(); 140 let mut meta = MetadataCommand::new();
141 meta.cargo_path(ra_toolchain::cargo()); 141 meta.cargo_path(ra_toolchain::cargo());
142 meta.manifest_path(cargo_toml); 142 meta.manifest_path(cargo_toml.to_path_buf());
143 if cargo_features.all_features { 143 if cargo_features.all_features {
144 meta.features(CargoOpt::AllFeatures); 144 meta.features(CargoOpt::AllFeatures);
145 } else if cargo_features.no_default_features { 145 } else if cargo_features.no_default_features {
@@ -150,7 +150,7 @@ impl CargoWorkspace {
150 meta.features(CargoOpt::SomeFeatures(cargo_features.features.clone())); 150 meta.features(CargoOpt::SomeFeatures(cargo_features.features.clone()));
151 } 151 }
152 if let Some(parent) = cargo_toml.parent() { 152 if let Some(parent) = cargo_toml.parent() {
153 meta.current_dir(parent); 153 meta.current_dir(parent.to_path_buf());
154 } 154 }
155 if let Some(target) = cargo_features.target.as_ref() { 155 if let Some(target) = cargo_features.target.as_ref() {
156 meta.other_options(vec![String::from("--filter-platform"), target.clone()]); 156 meta.other_options(vec![String::from("--filter-platform"), target.clone()]);