Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/project-model/src/cargo_workspace.rs')
| -rw-r--r-- | crates/project-model/src/cargo_workspace.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/crates/project-model/src/cargo_workspace.rs b/crates/project-model/src/cargo_workspace.rs index bc1fcd08e2..361f8721a4 100644 --- a/crates/project-model/src/cargo_workspace.rs +++ b/crates/project-model/src/cargo_workspace.rs @@ -82,6 +82,8 @@ pub struct CargoConfig { pub target: Option<String>, /// Sysroot loading behavior pub sysroot: Option<RustLibSource>, + /// Whether to invoke `cargo metadata` on the sysroot crate. + pub sysroot_query_metadata: bool, pub sysroot_src: Option<AbsPathBuf>, /// rustc private crate source pub rustc_source: Option<RustLibSource>, @@ -366,7 +368,7 @@ impl CargoWorkspace { name, root: AbsPathBuf::assert(src_path.into()), kind: TargetKind::new(&kind), - is_proc_macro: &*kind == ["proc-macro"], + is_proc_macro: *kind == ["proc-macro"], required_features, }); pkg_data.targets.push(tgt); @@ -439,7 +441,7 @@ impl CargoWorkspace { .collect::<Vec<ManifestPath>>(); // some packages has this pkg as dep. return their manifests - if parent_manifests.len() > 0 { + if !parent_manifests.is_empty() { return Some(parent_manifests); } |