Skip to content

Commit

Permalink
Rename merge capabilities method
Browse files Browse the repository at this point in the history
As we don't only merge we also insert if there is no capabilities for the client yet.
  • Loading branch information
RemcoSmitsDev committed Dec 26, 2024
1 parent 16541c0 commit 569e784
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions crates/debugger_ui/src/debugger_panel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ impl DebugPanel {
) {
if let Some(capabilities) = capabilities {
self.dap_store.update(cx, |store, cx| {
store.merge_capabilities_for_client(&session_id, &client_id, capabilities, cx);
store.update_capabilities_for_client(&session_id, &client_id, capabilities, cx);
});

cx.emit(DebugPanelEvent::CapabilitiesChanged(*client_id));
Expand Down Expand Up @@ -923,7 +923,7 @@ impl DebugPanel {
cx: &mut ViewContext<Self>,
) {
self.dap_store.update(cx, |store, cx| {
store.merge_capabilities_for_client(session_id, client_id, &event.capabilities, cx);
store.update_capabilities_for_client(session_id, client_id, &event.capabilities, cx);
});

cx.emit(DebugPanelEvent::CapabilitiesChanged(*client_id));
Expand Down
6 changes: 3 additions & 3 deletions crates/project/src/dap_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ impl DapStore {
.unwrap_or_default()
}

pub fn merge_capabilities_for_client(
pub fn update_capabilities_for_client(
&mut self,
session_id: &DebugSessionId,
client_id: &DebugAdapterClientId,
Expand Down Expand Up @@ -668,7 +668,7 @@ impl DapStore {
.await?;

this.update(&mut cx, |store, cx| {
store.merge_capabilities_for_client(&session_id, &client_id, &capabilities, cx);
store.update_capabilities_for_client(&session_id, &client_id, &capabilities, cx);
})
})
}
Expand Down Expand Up @@ -1539,7 +1539,7 @@ impl DapStore {
mut cx: AsyncAppContext,
) -> Result<()> {
this.update(&mut cx, |dap_store, cx| {
dap_store.merge_capabilities_for_client(
dap_store.update_capabilities_for_client(
&DebugSessionId::from_proto(envelope.payload.session_id),
&DebugAdapterClientId::from_proto(envelope.payload.client_id),
&dap::proto_conversions::capabilities_from_proto(&envelope.payload),
Expand Down

0 comments on commit 569e784

Please sign in to comment.