@@ -505,12 +505,7 @@ impl Client {
505505 self.request_counter.fetch_add(1, Ordering::Relaxed)
506506 }
507507
508− async fn request(
509− &self,
510− command: String,
511− arguments: Option<Value>,
512− response: bool,
513− ) -> Result<Option<Response>> {
508+ async fn request(&self, command: String, arguments: Option<Value>) -> Result<Response> {
514509 let (callback_rx, mut callback_tx) = channel(1);
515510
516511 let req = Request {
@@ -524,11 +519,7 @@ impl Client {
524519 .send(req)
525520 .expect("Failed to send request to debugger");
526521
527− if response {
528− Ok(Some(callback_tx.recv().await.unwrap()?))
529− } else {
530− Ok(None)
531− }
522+ Ok(callback_tx.recv().await.unwrap()?)
532523 }
533524
534525 pub fn capabilities(&self) -> &DebuggerCapabilities {
@@ -555,23 +546,22 @@ impl Client {
555546 };
556547
557548 let response = self
558− .request("initialize".to_owned(), to_value(args).ok(), true)
559− .await?
560− .unwrap();
549+ .request("initialize".to_owned(), to_value(args).ok())
550+ .await?;
561551 self.capabilities = from_value(response.body.unwrap()).ok();
562552
563553 Ok(())
564554 }
565555
566556 pub async fn disconnect(&mut self) -> Result<()> {
567− self.request("disconnect".to_owned(), None, true).await?;
557+ self.request("disconnect".to_owned(), None).await?;
568558 Ok(())
569559 }
570560
571561 pub async fn launch(&mut self, args: impl Serialize) -> Result<()> {
572562 let mut initialized = self.listen_for_event("initialized".to_owned()).await;
573563
574− let res = self.request("launch".to_owned(), to_value(args).ok(), true);
564+ let res = self.request("launch".to_owned(), to_value(args).ok());
575565 let ev = initialized.recv();
576566 join!(res, ev).0?;
577567
@@ -581,7 +571,7 @@ impl Client {
581571 pub async fn attach(&mut self, args: impl Serialize) -> Result<()> {
582572 let mut initialized = self.listen_for_event("initialized".to_owned()).await;
583573
584− let res = self.request("attach".to_owned(), to_value(args).ok(), false);
574+ let res = self.request("attach".to_owned(), to_value(args).ok());
585575 let ev = initialized.recv();
586576 join!(res, ev).0?;
587577
@@ -609,17 +599,15 @@ impl Client {
609599 };
610600
611601 let response = self
612− .request("setBreakpoints".to_owned(), to_value(args).ok(), true)
613− .await?
614− .unwrap();
602+ .request("setBreakpoints".to_owned(), to_value(args).ok())
603+ .await?;
615604 let body: Option<SetBreakpointsResponseBody> = from_value(response.body.unwrap()).ok();
616605
617606 Ok(body.map(|b| b.breakpoints).unwrap())
618607 }
619608
620609 pub async fn configuration_done(&mut self) -> Result<()> {
621− self.request("configurationDone".to_owned(), None, true)
622− .await?;
610+ self.request("configurationDone".to_owned(), None).await?;
623611 Ok(())
624612 }
625613
@@ -627,9 +615,8 @@ impl Client {
627615 let args = ContinueArguments { thread_id };
628616
629617 let response = self
630− .request("continue".to_owned(), to_value(args).ok(), true)
631− .await?
632− .unwrap();
618+ .request("continue".to_owned(), to_value(args).ok())
619+ .await?;
633620
634621 let body: Option<ContinueResponseBody> = from_value(response.body.unwrap()).ok();
635622
@@ -648,9 +635,8 @@ impl Client {
648635 };
649636
650637 let response = self
651− .request("stackTrace".to_owned(), to_value(args).ok(), true)
652− .await?
653− .unwrap();
638+ .request("stackTrace".to_owned(), to_value(args).ok())
639+ .await?;
654640
655641 let body: StackTraceResponseBody = from_value(response.body.unwrap()).unwrap();
656642
@@ -658,10 +644,7 @@ impl Client {
658644 }
659645
660646 pub async fn threads(&mut self) -> Result<Vec<Thread>> {
661− let response = self
662− .request("threads".to_owned(), None, true)
663− .await?
664− .unwrap();
647+ let response = self.request("threads".to_owned(), None).await?;
665648
666649 let body: ThreadsResponseBody = from_value(response.body.unwrap()).unwrap();
667650
@@ -672,9 +655,8 @@ impl Client {
672655 let args = ScopesArguments { frame_id };
673656
674657 let response = self
675− .request("scopes".to_owned(), to_value(args).ok(), true)
676− .await?
677− .unwrap();
658+ .request("scopes".to_owned(), to_value(args).ok())
659+ .await?;
678660
679661 let body: ScopesResponseBody = from_value(response.body.unwrap()).unwrap();
680662
@@ -691,9 +673,8 @@ impl Client {
691673 };
692674
693675 let response = self
694− .request("variables".to_owned(), to_value(args).ok(), true)
695− .await?
696− .unwrap();
676+ .request("variables".to_owned(), to_value(args).ok())
677+ .await?;
697678
698679 let body: VariablesResponseBody = from_value(response.body.unwrap()).unwrap();
699680