From 05d3ad4a0e989b2bcc34a1b396a396621be2e612 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Hrastnik?= Date: Mon, 22 Nov 2021 00:02:58 +0900 Subject: [PATCH] dap: Remove an excess clone on enable_exceptions --- helix-term/src/commands/dap.rs | 6 ++---- 1 file 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)); }