summaryrefslogtreecommitdiff
path: root/helix-dap/src
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-12-03 04:27:00 +0000
committerBlaž Hrastnik2021-12-03 04:27:00 +0000
commit43fbb6d965ad5a1a6cd07c0646a0e6b278ff5397 (patch)
tree74d8084982a4278920ad9ac1f3bd7aa11fdb3f23 /helix-dap/src
parent032aaffa153e534481385af3b9fd3b8217d2e253 (diff)
Make dap_start non-blocking
Diffstat (limited to 'helix-dap/src')
-rw-r--r--helix-dap/src/client.rs12
1 files changed, 4 insertions, 8 deletions
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::<requests::Disconnect>(()).await
}
- pub async fn launch(&mut self, args: serde_json::Value) -> Result<Value> {
- let response = self.request::<requests::Launch>(args).await?;
- log::error!("launch response {}", response);
- Ok(response)
+ pub fn launch(&self, args: serde_json::Value) -> impl Future<Output = Result<Value>> {
+ self.call::<requests::Launch>(args)
}
- pub async fn attach(&mut self, args: serde_json::Value) -> Result<Value> {
- let response = self.request::<requests::Attach>(args).await?;
- log::error!("attach response {}", response);
- Ok(response)
+ pub fn attach(&self, args: serde_json::Value) -> impl Future<Output = Result<Value>> {
+ self.call::<requests::Attach>(args)
}
pub async fn set_breakpoints(