From aac586b5464fef5f850d9c80bc3c9467e255977d Mon Sep 17 00:00:00 2001 From: Dmitry Sharshakov Date: Fri, 13 Aug 2021 20:33:07 +0300 Subject: types: simplify working with client's launch args --- helix-dap/src/client.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'helix-dap/src') 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 -- cgit v1.2.3-70-g09d2