mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
Move cargo metadata off the main loop
This commit is contained in:
parent
83f3cdca4f
commit
6c7578bd7a
4 changed files with 56 additions and 43 deletions
|
@ -150,7 +150,7 @@ impl ProjectManifest {
|
|||
impl ProjectWorkspace {
|
||||
pub fn load(
|
||||
manifest: ProjectManifest,
|
||||
cargo_features: &CargoConfig,
|
||||
cargo_config: &CargoConfig,
|
||||
with_sysroot: bool,
|
||||
) -> Result<ProjectWorkspace> {
|
||||
let res = match manifest {
|
||||
|
@ -166,7 +166,7 @@ impl ProjectWorkspace {
|
|||
ProjectWorkspace::Json { project }
|
||||
}
|
||||
ProjectManifest::CargoToml(cargo_toml) => {
|
||||
let cargo = CargoWorkspace::from_cargo_metadata(&cargo_toml, cargo_features)
|
||||
let cargo = CargoWorkspace::from_cargo_metadata(&cargo_toml, cargo_config)
|
||||
.with_context(|| {
|
||||
format!(
|
||||
"Failed to read Cargo metadata from Cargo.toml file {}",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue