diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-07-05 10:17:27 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-07-05 10:17:27 +0100 |
commit | 6b74e27ba06d1f15ffca22020d72f0c170ec9680 (patch) | |
tree | a8390ab63e3038a99b88ff179abb6034bc35f25a /crates/ra_project_model | |
parent | 6c2f42260c35689647c30966a6ac8447a91c8871 (diff) | |
parent | 4be73c2b7f85b75be69bbe99ed4b1f82659a11c9 (diff) |
Merge #5227
5227: AbsPath r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_project_model')
-rw-r--r-- | crates/ra_project_model/src/cargo_workspace.rs | 6 |
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 | ||
135 | impl CargoWorkspace { | 135 | impl 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()]); |