Reduce scope of deserialization
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
mod args;
|
||||
|
||||
use lsp_server::Connection;
|
||||
|
||||
use rust_analyzer::{cli, config::Config, from_json, Result};
|
||||
|
||||
use crate::args::HelpPrinted;
|
||||
|
||||
@@ -8,7 +8,7 @@ use crossbeam_channel::{unbounded, Receiver};
|
||||
use ra_db::{ExternSourceId, FileId, SourceRootId};
|
||||
use ra_ide::{AnalysisChange, AnalysisHost};
|
||||
use ra_project_model::{
|
||||
get_rustc_cfg_options, CargoFeatures, PackageRoot, ProcMacroClient, ProjectWorkspace,
|
||||
get_rustc_cfg_options, CargoConfig, PackageRoot, ProcMacroClient, ProjectWorkspace,
|
||||
};
|
||||
use ra_vfs::{RootEntry, Vfs, VfsChange, VfsTask, Watch};
|
||||
use rustc_hash::{FxHashMap, FxHashSet};
|
||||
@@ -29,7 +29,7 @@ pub(crate) fn load_cargo(
|
||||
let root = std::env::current_dir()?.join(root);
|
||||
let ws = ProjectWorkspace::discover(
|
||||
root.as_ref(),
|
||||
&CargoFeatures { load_out_dirs_from_check, ..Default::default() },
|
||||
&CargoConfig { load_out_dirs_from_check, ..Default::default() },
|
||||
)?;
|
||||
|
||||
let mut extern_dirs = FxHashSet::default();
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
use lsp_types::TextDocumentClientCapabilities;
|
||||
use ra_flycheck::FlycheckConfig;
|
||||
use ra_ide::{CompletionConfig, InlayHintsConfig};
|
||||
use ra_project_model::CargoFeatures;
|
||||
use ra_project_model::CargoConfig;
|
||||
use serde::Deserialize;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
@@ -29,7 +29,7 @@ pub struct Config {
|
||||
pub lru_capacity: Option<usize>,
|
||||
pub use_client_watching: bool,
|
||||
pub exclude_globs: Vec<String>,
|
||||
pub cargo: CargoFeatures,
|
||||
pub cargo: CargoConfig,
|
||||
pub with_sysroot: bool,
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ impl Default for Config {
|
||||
lru_capacity: None,
|
||||
use_client_watching: false,
|
||||
exclude_globs: Vec::new(),
|
||||
cargo: CargoFeatures::default(),
|
||||
cargo: CargoConfig::default(),
|
||||
with_sysroot: true,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user