aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/ra_lsp_server/src/cargo_target_spec.rs4
-rw-r--r--crates/ra_lsp_server/src/main_loop/handlers.rs3
2 files changed, 3 insertions, 4 deletions
diff --git a/crates/ra_lsp_server/src/cargo_target_spec.rs b/crates/ra_lsp_server/src/cargo_target_spec.rs
index 5fd1e7b6b..56d3f0de4 100644
--- a/crates/ra_lsp_server/src/cargo_target_spec.rs
+++ b/crates/ra_lsp_server/src/cargo_target_spec.rs
@@ -6,11 +6,9 @@ use ra_project_model::{self, ProjectWorkspace, TargetKind};
6use crate::{world::WorldSnapshot, Result}; 6use crate::{world::WorldSnapshot, Result};
7 7
8pub(crate) fn runnable_args( 8pub(crate) fn runnable_args(
9 world: &WorldSnapshot, 9 spec: Option<CargoTargetSpec>,
10 file_id: FileId,
11 kind: &RunnableKind, 10 kind: &RunnableKind,
12) -> Result<Vec<String>> { 11) -> Result<Vec<String>> {
13 let spec = CargoTargetSpec::for_file(world, file_id)?;
14 let mut res = Vec::new(); 12 let mut res = Vec::new();
15 match kind { 13 match kind {
16 RunnableKind::Test { test_id } => { 14 RunnableKind::Test { test_id } => {
diff --git a/crates/ra_lsp_server/src/main_loop/handlers.rs b/crates/ra_lsp_server/src/main_loop/handlers.rs
index ae51141cb..833f31d96 100644
--- a/crates/ra_lsp_server/src/main_loop/handlers.rs
+++ b/crates/ra_lsp_server/src/main_loop/handlers.rs
@@ -921,7 +921,8 @@ fn to_lsp_runnable(
921 file_id: FileId, 921 file_id: FileId,
922 runnable: Runnable, 922 runnable: Runnable,
923) -> Result<req::Runnable> { 923) -> Result<req::Runnable> {
924 let args = runnable_args(world, file_id, &runnable.kind)?; 924 let spec: Option<CargoTargetSpec> = CargoTargetSpec::for_file(world, file_id)?;
925 let args = runnable_args(spec, &runnable.kind)?;
925 let line_index = world.analysis().file_line_index(file_id)?; 926 let line_index = world.analysis().file_line_index(file_id)?;
926 let label = match &runnable.kind { 927 let label = match &runnable.kind {
927 RunnableKind::Test { test_id } => format!("test {}", test_id), 928 RunnableKind::Test { test_id } => format!("test {}", test_id),