Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Remove AsyncAppContext::remove_window

Nathan Sobo1fd80ba8bd12
diff --git a/crates/gpui/src/app.rs b/crates/gpui/src/app.rs
index e44ac93818f..2b3a3f3bf4a 100644
--- a/crates/gpui/src/app.rs
+++ b/crates/gpui/src/app.rs
@@ -411,10 +411,6 @@ impl AsyncAppContext {
self.update(|cx| cx.add_window(window_options, build_root_view))
}
- pub fn remove_window(&mut self, window: AnyWindowHandle) {
- self.update_window(window, |cx| cx.remove_window());
- }
-
pub fn activate_window(&mut self, window: AnyWindowHandle) {
self.update_window(window, |cx| cx.activate_window());
}
diff --git a/crates/workspace/src/workspace.rs b/crates/workspace/src/workspace.rs
index f0990322653..f2a7a442f44 100644
--- a/crates/workspace/src/workspace.rs
+++ b/crates/workspace/src/workspace.rs
@@ -1254,7 +1254,7 @@ impl Workspace {
let prepare = self.prepare_to_close(false, cx);
Some(cx.spawn(|_, mut cx| async move {
if prepare.await? {
- cx.remove_window(window);
+ window.remove(&mut cx);
}
Ok(())
}))