From 2c8fffc4f8e1667ecc6eb1779c1a03f7de07393c Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Fri, 19 May 2023 21:47:00 +0300 Subject: [PATCH] Use better name for the method that closes deleted buffers co-authored-by: Max --- crates/workspace/src/pane.rs | 2 +- crates/workspace/src/workspace.rs | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/workspace/src/pane.rs b/crates/workspace/src/pane.rs index c54f8d393b..39f1a9fd9e 100644 --- a/crates/workspace/src/pane.rs +++ b/crates/workspace/src/pane.rs @@ -1305,7 +1305,7 @@ impl Pane { &self.toolbar } - pub fn delete_item( + pub fn handle_deleted_project_item( &mut self, entry_id: ProjectEntryId, cx: &mut ViewContext, diff --git a/crates/workspace/src/workspace.rs b/crates/workspace/src/workspace.rs index 11703aba6e..8a5ce7a105 100644 --- a/crates/workspace/src/workspace.rs +++ b/crates/workspace/src/workspace.rs @@ -539,7 +539,9 @@ impl Workspace { project::Event::DeletedEntry(entry_id) => { for pane in this.panes.iter() { - pane.update(cx, |pane, cx| pane.delete_item(*entry_id, cx)); + pane.update(cx, |pane, cx| { + pane.handle_deleted_project_item(*entry_id, cx) + }); } }