on master help sign in
dap: Remove an excess clone on enable_exceptions
commit05d3ad4a0e989b2bcc34a1b396a396621be2e612 authorBlaž Hrastnik <blaz@mxxn.io> dateMon 22 Nov 2021, 00:02 (5 years ago) parentd1854d8
1 file changed+2−4
helix-term/src/commands/dap.rs+2−4
helix-term/src/commands/dap.rs+2−4
@@ -607,13 +607,11 @@ pub fn dap_enable_exceptions(cx: &mut Context) {
607607 };
608608
609609 let filters = match &debugger.capabilities().exception_breakpoint_filters {
610− Some(filters) => filters.clone(),
610+ Some(filters) => filters.iter().map(|f| f.filter.clone()).collect(),
611611 None => return,
612612 };
613613
614− if let Err(e) = block_on(
615− debugger.set_exception_breakpoints(filters.iter().map(|f| f.filter.clone()).collect()),
616− ) {
614+ if let Err(e) = block_on(debugger.set_exception_breakpoints(filters)) {
617615 cx.editor
618616 .set_error(format!("Failed to set up exception breakpoints: {}", e));
619617 }