aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/rust-analyzer/src/main_loop/handlers.rs10
-rw-r--r--crates/rust-analyzer/tests/heavy_tests/main.rs4
2 files changed, 5 insertions, 9 deletions
diff --git a/crates/rust-analyzer/src/main_loop/handlers.rs b/crates/rust-analyzer/src/main_loop/handlers.rs
index 0f623949e..c7a96ba93 100644
--- a/crates/rust-analyzer/src/main_loop/handlers.rs
+++ b/crates/rust-analyzer/src/main_loop/handlers.rs
@@ -46,11 +46,11 @@ use crate::{
46pub fn handle_analyzer_status(world: WorldSnapshot, _: ()) -> Result<String> { 46pub fn handle_analyzer_status(world: WorldSnapshot, _: ()) -> Result<String> {
47 let _p = profile("handle_analyzer_status"); 47 let _p = profile("handle_analyzer_status");
48 let mut buf = world.status(); 48 let mut buf = world.status();
49 format_to!(buf, "\n\nrequests:"); 49 format_to!(buf, "\n\nrequests:\n");
50 let requests = world.latest_requests.read(); 50 let requests = world.latest_requests.read();
51 for (is_last, r) in requests.iter() { 51 for (is_last, r) in requests.iter() {
52 let mark = if is_last { "*" } else { " " }; 52 let mark = if is_last { "*" } else { " " };
53 format_to!(buf, "{}{:4} {:<36}{}ms", mark, r.id, r.method, r.duration.as_millis()); 53 format_to!(buf, "{}{:4} {:<36}{}ms\n", mark, r.id, r.method, r.duration.as_millis());
54 } 54 }
55 Ok(buf) 55 Ok(buf)
56} 56}
@@ -400,11 +400,7 @@ pub fn handle_runnables(
400 range: Default::default(), 400 range: Default::default(),
401 label: format!("cargo {} -p {}", cmd, spec.package), 401 label: format!("cargo {} -p {}", cmd, spec.package),
402 bin: "cargo".to_string(), 402 bin: "cargo".to_string(),
403 args: { 403 args: vec![cmd.to_string(), "--package".to_string(), spec.package.clone()],
404 let mut args = vec![cmd.to_string()];
405 spec.clone().push_to(&mut args);
406 args
407 },
408 extra_args: Vec::new(), 404 extra_args: Vec::new(),
409 env: FxHashMap::default(), 405 env: FxHashMap::default(),
410 cwd: workspace_root.map(|root| root.to_owned()), 406 cwd: workspace_root.map(|root| root.to_owned()),
diff --git a/crates/rust-analyzer/tests/heavy_tests/main.rs b/crates/rust-analyzer/tests/heavy_tests/main.rs
index 07b8114c6..a218da76d 100644
--- a/crates/rust-analyzer/tests/heavy_tests/main.rs
+++ b/crates/rust-analyzer/tests/heavy_tests/main.rs
@@ -149,7 +149,7 @@ fn main() {}
149 "cwd": server.path().join("foo") 149 "cwd": server.path().join("foo")
150 }, 150 },
151 { 151 {
152 "args": [ "check", "--package", "foo", "--test", "spam" ], 152 "args": [ "check", "--package", "foo" ],
153 "extraArgs": [], 153 "extraArgs": [],
154 "bin": "cargo", 154 "bin": "cargo",
155 "env": {}, 155 "env": {},
@@ -161,7 +161,7 @@ fn main() {}
161 "cwd": server.path().join("foo") 161 "cwd": server.path().join("foo")
162 }, 162 },
163 { 163 {
164 "args": [ "test", "--package", "foo", "--test", "spam" ], 164 "args": [ "test", "--package", "foo" ],
165 "extraArgs": [], 165 "extraArgs": [],
166 "bin": "cargo", 166 "bin": "cargo",
167 "env": {}, 167 "env": {},