aboutsummaryrefslogtreecommitdiff
path: root/crates/project_model/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/project_model/src')
-rw-r--r--crates/project_model/src/build_data.rs6
-rw-r--r--crates/project_model/src/cargo_workspace.rs7
2 files changed, 5 insertions, 8 deletions
diff --git a/crates/project_model/src/build_data.rs b/crates/project_model/src/build_data.rs
index 3aa546980..33a4f8168 100644
--- a/crates/project_model/src/build_data.rs
+++ b/crates/project_model/src/build_data.rs
@@ -214,7 +214,7 @@ impl WorkspaceBuildData {
214 acc 214 acc
215 }; 215 };
216 let package_build_data = 216 let package_build_data =
217 res.per_package.entry(package_id.repr.clone()).or_default(); 217 res.per_package.entry(package_id.repr).or_default();
218 // cargo_metadata crate returns default (empty) path for 218 // cargo_metadata crate returns default (empty) path for
219 // older cargos, which is not absolute, so work around that. 219 // older cargos, which is not absolute, so work around that.
220 if !out_dir.as_str().is_empty() { 220 if !out_dir.as_str().is_empty() {
@@ -237,13 +237,13 @@ impl WorkspaceBuildData {
237 { 237 {
238 let filename = AbsPathBuf::assert(PathBuf::from(&filename)); 238 let filename = AbsPathBuf::assert(PathBuf::from(&filename));
239 let package_build_data = 239 let package_build_data =
240 res.per_package.entry(package_id.repr.clone()).or_default(); 240 res.per_package.entry(package_id.repr).or_default();
241 package_build_data.proc_macro_dylib_path = Some(filename); 241 package_build_data.proc_macro_dylib_path = Some(filename);
242 } 242 }
243 } 243 }
244 } 244 }
245 Message::CompilerMessage(message) => { 245 Message::CompilerMessage(message) => {
246 progress(message.target.name.clone()); 246 progress(message.target.name);
247 } 247 }
248 Message::BuildFinished(_) => {} 248 Message::BuildFinished(_) => {}
249 Message::TextLine(_) => {} 249 Message::TextLine(_) => {}
diff --git a/crates/project_model/src/cargo_workspace.rs b/crates/project_model/src/cargo_workspace.rs
index a8fee4f08..b8ad08364 100644
--- a/crates/project_model/src/cargo_workspace.rs
+++ b/crates/project_model/src/cargo_workspace.rs
@@ -346,11 +346,8 @@ impl CargoWorkspace {
346 346
347 let workspace_root = 347 let workspace_root =
348 AbsPathBuf::assert(PathBuf::from(meta.workspace_root.into_os_string())); 348 AbsPathBuf::assert(PathBuf::from(meta.workspace_root.into_os_string()));
349 let build_data_config = BuildDataConfig::new( 349 let build_data_config =
350 cargo_toml.to_path_buf(), 350 BuildDataConfig::new(cargo_toml.to_path_buf(), config.clone(), Arc::new(meta.packages));
351 config.clone(),
352 Arc::new(meta.packages.clone()),
353 );
354 351
355 Ok(CargoWorkspace { packages, targets, workspace_root, build_data_config }) 352 Ok(CargoWorkspace { packages, targets, workspace_root, build_data_config })
356 } 353 }