aboutsummaryrefslogtreecommitdiff
path: root/helix-dap/src
diff options
context:
space:
mode:
authorDmitry Sharshakov2021-08-13 17:33:07 +0000
committerBlaž Hrastnik2021-08-20 04:43:54 +0000
commitaac586b5464fef5f850d9c80bc3c9467e255977d (patch)
tree7db51a022746f5b778993031b58b0456e3f07619 /helix-dap/src
parent6bb653f820998a9a33db3dabf815a761b1c97bfa (diff)
types: simplify working with client's launch args
Diffstat (limited to 'helix-dap/src')
-rw-r--r--helix-dap/src/client.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/helix-dap/src/client.rs b/helix-dap/src/client.rs
index 7971dc54..f5aa8569 100644
--- a/helix-dap/src/client.rs
+++ b/helix-dap/src/client.rs
@@ -372,8 +372,9 @@ impl Client {
Ok(())
}
- pub async fn launch(&mut self, args: Value) -> Result<()> {
- self.request("launch".to_owned(), Some(args)).await?;
+ pub async fn launch(&mut self, args: impl Serialize) -> Result<()> {
+ self.request("launch".to_owned(), to_value(args).ok())
+ .await?;
match self
.server_rx