From 0777948fc03f9edeec33d13175d6631331409e9c Mon Sep 17 00:00:00 2001 From: Dmitry Sharshakov Date: Sat, 14 Aug 2021 09:17:53 +0300 Subject: dap-basic: better output formatting --- helix-dap/examples/dap-basic.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'helix-dap/examples') 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) { 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] -- cgit v1.2.3-70-g09d2