aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Sharshakov2021-08-14 06:17:53 +0000
committerBlaž Hrastnik2021-08-20 04:43:54 +0000
commit0777948fc03f9edeec33d13175d6631331409e9c (patch)
tree70d169d7b549c3b46a1f308d50c805a43c70e8a6
parent09390be6a568bcf7052c57bf10219c448413d5b0 (diff)
dap-basic: better output formatting
-rw-r--r--helix-dap/examples/dap-basic.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/helix-dap/examples/dap-basic.rs b/helix-dap/examples/dap-basic.rs
index fb52f855..3331c6bb 100644
--- a/helix-dap/examples/dap-basic.rs
+++ b/helix-dap/examples/dap-basic.rs
@@ -13,7 +13,11 @@ 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);
+ println!(
+ "> [{}] {}",
+ body.category.unwrap_or("unknown".to_owned()),
+ body.output
+ );
}
#[tokio::main]