aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--helix-dap/examples/dap-dlv.rs16
-rw-r--r--helix-dap/examples/dap-lldb.rs16
2 files changed, 18 insertions, 14 deletions
diff --git a/helix-dap/examples/dap-dlv.rs b/helix-dap/examples/dap-dlv.rs
index cb920e32..c42559b9 100644
--- a/helix-dap/examples/dap-dlv.rs
+++ b/helix-dap/examples/dap-dlv.rs
@@ -11,13 +11,15 @@ struct LaunchArguments {
}
async fn output(mut output_event: Receiver<Event>) {
- let body: OutputEventBody =
- from_value(output_event.recv().await.unwrap().body.unwrap()).unwrap();
- println!(
- "> [{}] {}",
- body.category.unwrap_or("unknown".to_owned()),
- body.output
- );
+ loop {
+ let body: OutputEventBody =
+ from_value(output_event.recv().await.unwrap().body.unwrap()).unwrap();
+ println!(
+ "> [{}] {}",
+ body.category.unwrap_or("unknown".to_owned()),
+ body.output
+ );
+ }
}
#[tokio::main]
diff --git a/helix-dap/examples/dap-lldb.rs b/helix-dap/examples/dap-lldb.rs
index 97d842ab..6fe666b2 100644
--- a/helix-dap/examples/dap-lldb.rs
+++ b/helix-dap/examples/dap-lldb.rs
@@ -11,13 +11,15 @@ struct LaunchArguments {
}
async fn output(mut output_event: Receiver<Event>) {
- let body: OutputEventBody =
- from_value(output_event.recv().await.unwrap().body.unwrap()).unwrap();
- println!(
- "> [{}] {}",
- body.category.unwrap_or("unknown".to_owned()),
- body.output
- );
+ loop {
+ let body: OutputEventBody =
+ from_value(output_event.recv().await.unwrap().body.unwrap()).unwrap();
+ println!(
+ "> [{}] {}",
+ body.category.unwrap_or("unknown".to_owned()),
+ body.output
+ );
+ }
}
#[tokio::main]