From 50fd860471f577e9bb7536e74eb181c055033183 Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Sat, 9 Feb 2019 11:08:24 +0100 Subject: Remove Vfs from project model --- crates/ra_lsp_server/src/server_world.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'crates/ra_lsp_server/src') diff --git a/crates/ra_lsp_server/src/server_world.rs b/crates/ra_lsp_server/src/server_world.rs index 23270d0aa..f97d240fa 100644 --- a/crates/ra_lsp_server/src/server_world.rs +++ b/crates/ra_lsp_server/src/server_world.rs @@ -58,8 +58,12 @@ impl ServerWorldState { // Create crate graph from all the workspaces let mut crate_graph = CrateGraph::default(); + let mut load = |path: &std::path::Path| { + let vfs_file = vfs.load(path); + vfs_file.map(|f| FileId(f.0.into())) + }; for ws in workspaces.iter() { - crate_graph.extend(ws.to_crate_graph(&mut vfs)); + crate_graph.extend(ws.to_crate_graph(&mut load)); } change.set_crate_graph(crate_graph); -- cgit v1.2.3