diff options
author | Blaž Hrastnik | 2021-11-21 15:02:58 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-11-21 15:02:58 +0000 |
commit | 05d3ad4a0e989b2bcc34a1b396a396621be2e612 (patch) | |
tree | 0e138b7c28cff5f635c3d4bf1c83b08b2cc9fb72 /helix-term/src/commands | |
parent | d1854d8e6af07cd78ab6c24c859a4471afb3514e (diff) |
dap: Remove an excess clone on enable_exceptions
Diffstat (limited to 'helix-term/src/commands')
-rw-r--r-- | helix-term/src/commands/dap.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/helix-term/src/commands/dap.rs b/helix-term/src/commands/dap.rs index 719520af..bf412c96 100644 --- a/helix-term/src/commands/dap.rs +++ b/helix-term/src/commands/dap.rs @@ -607,13 +607,11 @@ pub fn dap_enable_exceptions(cx: &mut Context) { }; let filters = match &debugger.capabilities().exception_breakpoint_filters { - Some(filters) => filters.clone(), + Some(filters) => filters.iter().map(|f| f.filter.clone()).collect(), None => return, }; - if let Err(e) = block_on( - debugger.set_exception_breakpoints(filters.iter().map(|f| f.filter.clone()).collect()), - ) { + if let Err(e) = block_on(debugger.set_exception_breakpoints(filters)) { cx.editor .set_error(format!("Failed to set up exception breakpoints: {}", e)); } |