diff options
author | Blaž Hrastnik | 2021-08-16 09:16:06 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-08-20 04:48:32 +0000 |
commit | d39baa3b4e1f5bc1a03533e7b22af0043ec1eac9 (patch) | |
tree | 11f769898442e5d4fbddb8aacf2b7ff05fb33cb5 /helix-dap/src/transport.rs | |
parent | 0300dbdeb378fa5797a23ce8b3f72e2749c3ce50 (diff) |
Start integrating into the editor's event loop
Diffstat (limited to 'helix-dap/src/transport.rs')
-rw-r--r-- | helix-dap/src/transport.rs | 21 |
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))) } } |