Remove TestAppContext::add_view

Instead, we now call this on window handles.
This commit is contained in:
Nathan Sobo 2023-08-07 22:15:53 -06:00
parent 0f332238b3
commit f0da6b05fd
9 changed files with 35 additions and 93 deletions

View file

@ -162,15 +162,6 @@ impl TestAppContext {
WindowHandle::new(window.id())
}
pub fn add_view<T, F>(&mut self, window_id: usize, build_view: F) -> ViewHandle<T>
where
T: View,
F: FnOnce(&mut ViewContext<T>) -> T,
{
self.update_window(window_id, |cx| cx.add_view(build_view))
.expect("window not found")
}
pub fn observe_global<E, F>(&mut self, callback: F) -> Subscription
where
E: Any,