From 422efe59afe333a8371afe6f9fb45f159a6fb07f Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 27 Aug 2018 22:52:43 +0300 Subject: you better run --- crates/server/src/main_loop/handlers.rs | 42 --------------------------------- 1 file changed, 42 deletions(-) (limited to 'crates/server/src/main_loop') diff --git a/crates/server/src/main_loop/handlers.rs b/crates/server/src/main_loop/handlers.rs index 583af0900..ee4072084 100644 --- a/crates/server/src/main_loop/handlers.rs +++ b/crates/server/src/main_loop/handlers.rs @@ -135,48 +135,6 @@ pub fn handle_code_action( res.push(cmd); } } - for runnable in libeditor::runnables(&file) { - if !contains_offset_nonstrict(runnable.range, offset) { - continue; - } - - #[derive(Serialize)] - struct ProcessSpec { - bin: String, - args: Vec, - env: HashMap, - } - - let spec = ProcessSpec { - bin: "cargo".to_string(), - args: match runnable.kind { - libeditor::RunnableKind::Test { name } => { - vec![ - "test".to_string(), - "--".to_string(), - name, - "--nocapture".to_string(), - ] - } - libeditor::RunnableKind::Bin => vec!["run".to_string()] - }, - env: { - let mut m = HashMap::new(); - m.insert( - "RUST_BACKTRACE".to_string(), - "short".to_string(), - ); - m - } - }; - - let cmd = Command { - title: "Run ...".to_string(), - command: "libsyntax-rust.run".to_string(), - arguments: Some(vec![to_value(spec).unwrap()]), - }; - res.push(cmd); - } for (diag, quick_fix) in world.analysis().diagnostics(file_id)? { let quick_fix = match quick_fix { -- cgit v1.2.3