From 2b4de41bf0e0fc7d276e99f6359c9062df65473d Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Sun, 5 Dec 2021 14:43:34 +0900 Subject: dap: Reply to RunInTerminal --- helix-dap/src/client.rs | 3 ++- helix-dap/src/types.rs | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'helix-dap') diff --git a/helix-dap/src/client.rs b/helix-dap/src/client.rs index c3840007..9598e24e 100644 --- a/helix-dap/src/client.rs +++ b/helix-dap/src/client.rs @@ -262,10 +262,11 @@ impl Client { pub fn reply( &self, request_seq: u64, - command: String, + command: &str, result: core::result::Result, ) -> impl Future> { let server_tx = self.server_tx.clone(); + let command = command.to_string(); async move { let response = match result { diff --git a/helix-dap/src/types.rs b/helix-dap/src/types.rs index 3f61ba07..2c3df9c3 100644 --- a/helix-dap/src/types.rs +++ b/helix-dap/src/types.rs @@ -545,11 +545,11 @@ pub mod requests { // Reverse Requests - #[derive(Debug, PartialEq, Clone, Deserialize, Serialize)] + #[derive(Debug, Default, PartialEq, Clone, Deserialize, Serialize)] #[serde(rename_all = "camelCase")] pub struct RunInTerminalResponse { - pub process_id: Option, - pub shell_process_id: Option, + pub process_id: Option, + pub shell_process_id: Option, } #[derive(Debug, PartialEq, Clone, Deserialize, Serialize)] @@ -557,7 +557,7 @@ pub mod requests { pub struct RunInTerminalArguments { pub kind: Option, pub title: Option, - pub cwd: String, + pub cwd: Option, pub args: Vec, pub env: Option>>, } -- cgit v1.2.3-70-g09d2