aboutsummaryrefslogtreecommitdiff
path: root/helix-dap/src
diff options
context:
space:
mode:
authorDmitry Sharshakov2021-08-13 17:24:27 +0000
committerBlaž Hrastnik2021-08-20 04:43:54 +0000
commit6bb653f820998a9a33db3dabf815a761b1c97bfa (patch)
tree6aa79c649558ff9b019b9a84c9b32adaa6da343b /helix-dap/src
parent3d64cf8356044fb272fd0a93e8235f967b9da156 (diff)
dap: move launch request argumets outside of client
Diffstat (limited to 'helix-dap/src')
-rw-r--r--helix-dap/src/client.rs18
1 files changed, 2 insertions, 16 deletions
diff --git a/helix-dap/src/client.rs b/helix-dap/src/client.rs
index 41e7dca6..7971dc54 100644
--- a/helix-dap/src/client.rs
+++ b/helix-dap/src/client.rs
@@ -45,14 +45,6 @@ struct InitializeArguments {
supports_invalidated_event: bool,
}
-// TODO: split out, as it's a debugger-specific payload not covered by standard
-#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
-#[serde(rename_all = "camelCase")]
-struct LaunchArguments {
- mode: String,
- program: String,
-}
-
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct Checksum {
@@ -380,14 +372,8 @@ impl Client {
Ok(())
}
- pub async fn launch(&mut self, executable: String) -> Result<()> {
- let args = LaunchArguments {
- mode: "exec".to_owned(),
- program: executable,
- };
-
- self.request("launch".to_owned(), to_value(args).ok())
- .await?;
+ pub async fn launch(&mut self, args: Value) -> Result<()> {
+ self.request("launch".to_owned(), Some(args)).await?;
match self
.server_rx