From 36fb8d1b1ab9f5e0c242e2d167bfaa91f41b7466 Mon Sep 17 00:00:00 2001 From: Dmitry Sharshakov Date: Sat, 14 Aug 2021 16:36:06 +0300 Subject: examples: make examples identical --- helix-dap/examples/dap-dlv.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'helix-dap/examples') diff --git a/helix-dap/examples/dap-dlv.rs b/helix-dap/examples/dap-dlv.rs index de8c2e02..cb920e32 100644 --- a/helix-dap/examples/dap-dlv.rs +++ b/helix-dap/examples/dap-dlv.rs @@ -79,8 +79,12 @@ pub async fn main() -> Result<()> { from_value(stopped_event.recv().await.unwrap().body.unwrap()).unwrap(); println!("stopped: {:?}", stop); - println!("threads: {:#?}", client.threads().await); - let bt = client.stack_trace(1).await.expect("expected stack trace"); + let threads = client.threads().await?; + println!("threads: {:#?}", threads); + let bt = client + .stack_trace(threads[0].id) + .await + .expect("expected stack trace"); println!("stack trace: {:#?}", bt); let scopes = client .scopes(bt.0[0].id) -- cgit v1.2.3-70-g09d2