From 184abdc51061bd1636f31edcb51d71d0362a3d83 Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Mon, 16 Aug 2021 13:59:02 +0900 Subject: dap: Significantly simplify code using the Request trait --- helix-dap/examples/dap-dlv.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'helix-dap/examples/dap-dlv.rs') diff --git a/helix-dap/examples/dap-dlv.rs b/helix-dap/examples/dap-dlv.rs index a18ec5e2..352c2144 100644 --- a/helix-dap/examples/dap-dlv.rs +++ b/helix-dap/examples/dap-dlv.rs @@ -1,4 +1,4 @@ -use helix_dap::{Client, Event, OutputEventBody, Result, SourceBreakpoint, StoppedEventBody}; +use helix_dap::{events, Client, Event, Result, SourceBreakpoint}; use serde::{Deserialize, Serialize}; use serde_json::from_value; use tokio::sync::mpsc::Receiver; @@ -12,7 +12,7 @@ struct LaunchArguments { async fn output(mut output_event: Receiver) { loop { - let body: OutputEventBody = + let body: events::Output = from_value(output_event.recv().await.unwrap().body.unwrap()).unwrap(); println!( "> [{}] {}", @@ -77,7 +77,7 @@ pub async fn main() -> Result<()> { println!("configurationDone: {:?}", client.configuration_done().await); - let stop: StoppedEventBody = + let stop: events::Stopped = from_value(stopped_event.recv().await.unwrap().body.unwrap()).unwrap(); println!("stopped: {:?}", stop); -- cgit v1.2.3-70-g09d2