From a5ef8ad05b7c1f7148c59814b55d641fd75aff75 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 19 Dec 2018 15:04:15 +0300 Subject: swtich lsp server to vfs --- crates/ra_lsp_server/src/main_loop/handlers.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_lsp_server/src/main_loop') diff --git a/crates/ra_lsp_server/src/main_loop/handlers.rs b/crates/ra_lsp_server/src/main_loop/handlers.rs index acca480c7..572ae7fb5 100644 --- a/crates/ra_lsp_server/src/main_loop/handlers.rs +++ b/crates/ra_lsp_server/src/main_loop/handlers.rs @@ -326,9 +326,9 @@ pub fn handle_runnables( None => return Ok(None), }; let file_id = world.analysis().crate_root(crate_id)?; - let path = world.path_map.get_path(file_id); + let path = world.vfs.read().file2path(ra_vfs::VfsFile(file_id.0)); let res = world.workspaces.iter().find_map(|ws| { - let tgt = ws.target_by_root(path)?; + let tgt = ws.target_by_root(&path)?; let res = CargoTargetSpec { package: tgt.package(ws).name(ws).to_string(), target: tgt.name(ws).to_string(), -- cgit v1.2.3