diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-12-20 09:16:07 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-12-20 09:16:07 +0000 |
commit | 9a16cf2bf646a4a881f3f5acbf5582dacc4337bf (patch) | |
tree | ff90eb390a8f5af47b6d0c6ec4c49b4431b82d1c /crates/ra_lsp_server/src/main_loop/handlers.rs | |
parent | dbb62b5baa36783bbca06f09c77794fce3ceff0c (diff) | |
parent | a084412f0698d5f54d586f707930e141c88b0673 (diff) |
Merge #292
292: Vfs r=matklad a=matklad
closes #243
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_lsp_server/src/main_loop/handlers.rs')
-rw-r--r-- | crates/ra_lsp_server/src/main_loop/handlers.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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( | |||
326 | None => return Ok(None), | 326 | None => return Ok(None), |
327 | }; | 327 | }; |
328 | let file_id = world.analysis().crate_root(crate_id)?; | 328 | let file_id = world.analysis().crate_root(crate_id)?; |
329 | let path = world.path_map.get_path(file_id); | 329 | let path = world.vfs.read().file2path(ra_vfs::VfsFile(file_id.0)); |
330 | let res = world.workspaces.iter().find_map(|ws| { | 330 | let res = world.workspaces.iter().find_map(|ws| { |
331 | let tgt = ws.target_by_root(path)?; | 331 | let tgt = ws.target_by_root(&path)?; |
332 | let res = CargoTargetSpec { | 332 | let res = CargoTargetSpec { |
333 | package: tgt.package(ws).name(ws).to_string(), | 333 | package: tgt.package(ws).name(ws).to_string(), |
334 | target: tgt.name(ws).to_string(), | 334 | target: tgt.name(ws).to_string(), |