mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-23 01:46:18 +04:00
dap: Remove an excess clone on enable_exceptions
This commit is contained in:
parent
d1854d8e6a
commit
05d3ad4a0e
@ -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));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user