From 43fbb6d965ad5a1a6cd07c0646a0e6b278ff5397 Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Fri, 3 Dec 2021 13:27:00 +0900 Subject: Make dap_start non-blocking --- helix-dap/src/client.rs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'helix-dap/src') diff --git a/helix-dap/src/client.rs b/helix-dap/src/client.rs index 09b4eaa1..61c05a0b 100644 --- a/helix-dap/src/client.rs +++ b/helix-dap/src/client.rs @@ -288,16 +288,12 @@ impl Client { self.request::(()).await } - pub async fn launch(&mut self, args: serde_json::Value) -> Result { - let response = self.request::(args).await?; - log::error!("launch response {}", response); - Ok(response) + pub fn launch(&self, args: serde_json::Value) -> impl Future> { + self.call::(args) } - pub async fn attach(&mut self, args: serde_json::Value) -> Result { - let response = self.request::(args).await?; - log::error!("attach response {}", response); - Ok(response) + pub fn attach(&self, args: serde_json::Value) -> impl Future> { + self.call::(args) } pub async fn set_breakpoints( -- cgit v1.2.3-70-g09d2