summaryrefslogtreecommitdiff
path: root/helix-dap/src/transport.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-dap/src/transport.rs')
-rw-r--r--helix-dap/src/transport.rs21
1 files changed, 9 insertions, 12 deletions
diff --git a/helix-dap/src/transport.rs b/helix-dap/src/transport.rs
index bca1351c..062e0447 100644
--- a/helix-dap/src/transport.rs
+++ b/helix-dap/src/transport.rs
@@ -159,20 +159,17 @@ impl Transport {
}
fn process_response(res: Response) -> Result<Response> {
- match res.success {
- true => {
- info!("<- DAP success in response to {}", res.request_seq);
+ if res.success {
+ info!("<- DAP success in response to {}", res.request_seq);
- Ok(res)
- }
- false => {
- error!(
- "<- DAP error {:?} ({:?}) for command #{} {}",
- res.message, res.body, res.request_seq, res.command
- );
+ Ok(res)
+ } else {
+ error!(
+ "<- DAP error {:?} ({:?}) for command #{} {}",
+ res.message, res.body, res.request_seq, res.command
+ );
- Err(Error::Other(anyhow::format_err!("{:?}", res.body)))
- }
+ Err(Error::Other(anyhow::format_err!("{:?}", res.body)))
}
}