mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Extract common fields out of ProjectWorkspace variants
This commit is contained in:
parent
a2ed6837bc
commit
ff56cb6e49
15 changed files with 248 additions and 333 deletions
|
@ -333,9 +333,7 @@ fn load_crate_graph(
|
|||
vfs: &mut vfs::Vfs,
|
||||
receiver: &Receiver<vfs::loader::Message>,
|
||||
) -> RootDatabase {
|
||||
let (ProjectWorkspace::Cargo { toolchain, target_layout, .. }
|
||||
| ProjectWorkspace::Json { toolchain, target_layout, .. }
|
||||
| ProjectWorkspace::DetachedFile { toolchain, target_layout, .. }) = ws;
|
||||
let ProjectWorkspace { toolchain, target_layout, .. } = ws;
|
||||
|
||||
let lru_cap = std::env::var("RA_LRU_CAP").ok().and_then(|it| it.parse::<usize>().ok());
|
||||
let mut db = RootDatabase::new(lru_cap);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue