aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_lsp_server/src/cargo_target_spec.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-01-16 10:59:03 +0000
committerGitHub <[email protected]>2020-01-16 10:59:03 +0000
commit04b8bda51582b06c5af8bf2fbacd58f264c9f6f0 (patch)
treeb06e700f4a8a038252852618f4a5ada06ca69f5b /crates/ra_lsp_server/src/cargo_target_spec.rs
parentc78d269b66dd7e02321bf447eef1375c81f66a1e (diff)
parentbd96d0b258437cbfcaba5d0a6a79813eaa5f29fe (diff)
Merge #2860
2860: Minimize visibility r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_lsp_server/src/cargo_target_spec.rs')
-rw-r--r--crates/ra_lsp_server/src/cargo_target_spec.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_lsp_server/src/cargo_target_spec.rs b/crates/ra_lsp_server/src/cargo_target_spec.rs
index c4a9e7101..594caffe2 100644
--- a/crates/ra_lsp_server/src/cargo_target_spec.rs
+++ b/crates/ra_lsp_server/src/cargo_target_spec.rs
@@ -63,7 +63,7 @@ impl CargoTargetSpec {
63 None => return Ok(None), 63 None => return Ok(None),
64 }; 64 };
65 let file_id = world.analysis().crate_root(crate_id)?; 65 let file_id = world.analysis().crate_root(crate_id)?;
66 let path = world.vfs.read().file2path(ra_vfs::VfsFile(file_id.0)); 66 let path = world.file_id_to_path(file_id);
67 let res = world.workspaces.iter().find_map(|ws| match ws { 67 let res = world.workspaces.iter().find_map(|ws| match ws {
68 ProjectWorkspace::Cargo { cargo, .. } => { 68 ProjectWorkspace::Cargo { cargo, .. } => {
69 let tgt = cargo.target_by_root(&path)?; 69 let tgt = cargo.target_by_root(&path)?;