Refactor item-closing actions (#31838)

While working on 

- https://github.com/zed-industries/zed/pull/31783
- https://github.com/zed-industries/zed/pull/31786

... I noticed some areas that could be improved through refactoring. The
bug in https://github.com/zed-industries/zed/pull/31783 came from having
duplicate code. The fix had been applied to one version, but not the
duplicated code.

This PR attempts to do some initial clean up, through some refactoring.

Release Notes:

- N/A
This commit is contained in:
Joseph T. Lyons 2025-05-31 19:38:32 -04:00 committed by GitHub
parent cc536655a1
commit 24e4446cd3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 184 additions and 178 deletions

View file

@ -1010,7 +1010,6 @@ async fn test_peers_following_each_other(cx_a: &mut TestAppContext, cx_b: &mut T
workspace_b.update_in(cx_b, |workspace, window, cx| {
workspace.active_pane().update(cx, |pane, cx| {
pane.close_inactive_items(&Default::default(), window, cx)
.unwrap()
.detach();
});
});