diff --git a/crates/collab/src/tests.rs b/crates/collab/src/tests.rs index c669e1da40..31d7b629f8 100644 --- a/crates/collab/src/tests.rs +++ b/crates/collab/src/tests.rs @@ -13,10 +13,7 @@ use client::{ use collections::{HashMap, HashSet}; use fs::FakeFs; use futures::{channel::oneshot, StreamExt as _}; -use gpui::{ - elements::*, executor::Deterministic, AnyElement, Entity, ModelHandle, Task, TestAppContext, - View, ViewContext, ViewHandle, WeakViewHandle, -}; +use gpui::{executor::Deterministic, ModelHandle, Task, TestAppContext, WindowHandle}; use language::LanguageRegistry; use parking_lot::Mutex; use project::{Project, WorktreeId}; @@ -541,50 +538,8 @@ impl TestClient { &self, project: &ModelHandle, cx: &mut TestAppContext, - // <<<<<<< HEAD - // ) -> ViewHandle { - // struct WorkspaceContainer { - // workspace: Option>, - // } - - // impl Entity for WorkspaceContainer { - // type Event = (); - // } - - // impl View for WorkspaceContainer { - // fn ui_name() -> &'static str { - // "WorkspaceContainer" - // } - - // fn render(&mut self, cx: &mut ViewContext) -> AnyElement { - // if let Some(workspace) = self - // .workspace - // .as_ref() - // .and_then(|workspace| workspace.upgrade(cx)) - // { - // ChildView::new(&workspace, cx).into_any() - // } else { - // Empty::new().into_any() - // } - // } - // } - - // // We use a workspace container so that we don't need to remove the window in order to - // // drop the workspace and we can use a ViewHandle instead. - // let window = cx.add_window(|_| WorkspaceContainer { workspace: None }); - // let container = window.root(cx); - // let workspace = window.add_view(cx, |cx| { - // Workspace::new(0, project.clone(), self.app_state.clone(), cx) - // }); - // container.update(cx, |container, cx| { - // container.workspace = Some(workspace.downgrade()); - // cx.notify(); - // }); - // workspace - // ======= ) -> WindowHandle { - cx.add_window(|cx| Workspace::test_new(project.clone(), cx)) - // >>>>>>> main + cx.add_window(|cx| Workspace::new(0, project.clone(), self.app_state.clone(), cx)) } }