aboutsummaryrefslogtreecommitdiff
path: root/helix-dap
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-08-16 05:05:10 +0000
committerBlaž Hrastnik2021-08-20 04:43:54 +0000
commit54dc2f8107229952928bc68f24946398a84cd56b (patch)
treeb10241a879f4413f69309be38da45789cce336d8 /helix-dap
parent8fbda0abaf337448dff56779a69fa97d99015f11 (diff)
Fix example compilation
Diffstat (limited to 'helix-dap')
-rw-r--r--helix-dap/examples/dap-dlv.rs4
-rw-r--r--helix-dap/examples/dap-lldb.rs4
2 files changed, 4 insertions, 4 deletions
diff --git a/helix-dap/examples/dap-dlv.rs b/helix-dap/examples/dap-dlv.rs
index 352c2144..bffca676 100644
--- a/helix-dap/examples/dap-dlv.rs
+++ b/helix-dap/examples/dap-dlv.rs
@@ -1,6 +1,6 @@
use helix_dap::{events, Client, Event, Result, SourceBreakpoint};
use serde::{Deserialize, Serialize};
-use serde_json::from_value;
+use serde_json::{from_value, to_value};
use tokio::sync::mpsc::Receiver;
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
@@ -50,7 +50,7 @@ pub async fn main() -> Result<()> {
program: "/tmp/godebug/main".to_owned(),
};
- println!("launch: {:?}", client.launch(args).await);
+ println!("launch: {:?}", client.launch(to_value(args)?).await);
println!(
"breakpoints: {:#?}",
diff --git a/helix-dap/examples/dap-lldb.rs b/helix-dap/examples/dap-lldb.rs
index 85ff2762..c9a99548 100644
--- a/helix-dap/examples/dap-lldb.rs
+++ b/helix-dap/examples/dap-lldb.rs
@@ -1,6 +1,6 @@
use helix_dap::{events, Client, Event, Result, SourceBreakpoint};
use serde::{Deserialize, Serialize};
-use serde_json::from_value;
+use serde_json::{from_value, to_value};
use tokio::sync::mpsc::Receiver;
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
@@ -50,7 +50,7 @@ pub async fn main() -> Result<()> {
console: "internalConsole".to_owned(),
};
- println!("launch: {:?}", client.launch(args).await);
+ println!("launch: {:?}", client.launch(to_value(args)?).await);
println!(
"breakpoints: {:#?}",