Skip to content

Commit 6b74e27

Browse files
bors[bot]matklad
andauthored
Merge #5227
5227: AbsPath r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
2 parents 6c2f422 + 4be73c2 commit 6b74e27

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

crates/ra_project_model/src/cargo_workspace.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,12 @@ impl PackageData {
134134

135135
impl CargoWorkspace {
136136
pub fn from_cargo_metadata(
137-
cargo_toml: &Path,
137+
cargo_toml: &AbsPath,
138138
cargo_features: &CargoConfig,
139139
) -> Result<CargoWorkspace> {
140140
let mut meta = MetadataCommand::new();
141141
meta.cargo_path(ra_toolchain::cargo());
142-
meta.manifest_path(cargo_toml);
142+
meta.manifest_path(cargo_toml.to_path_buf());
143143
if cargo_features.all_features {
144144
meta.features(CargoOpt::AllFeatures);
145145
} else if cargo_features.no_default_features {
@@ -150,7 +150,7 @@ impl CargoWorkspace {
150150
meta.features(CargoOpt::SomeFeatures(cargo_features.features.clone()));
151151
}
152152
if let Some(parent) = cargo_toml.parent() {
153-
meta.current_dir(parent);
153+
meta.current_dir(parent.to_path_buf());
154154
}
155155
if let Some(target) = cargo_features.target.as_ref() {
156156
meta.other_options(vec![String::from("--filter-platform"), target.clone()]);

0 commit comments

Comments
 (0)