checkpoint

This commit is contained in:
Mikayla 2023-11-08 23:16:04 -08:00
parent f569628088
commit 43eb7f28d1
No known key found for this signature in database
22 changed files with 591 additions and 1307 deletions

View file

@ -59,11 +59,14 @@ impl Context for TestAppContext {
app.read_model(handle, read)
}
fn read_window<R>(
fn read_window<T, R>(
&self,
window: &AnyWindowHandle,
read: impl FnOnce(AnyView, &AppContext) -> R,
) -> Result<R> {
window: &WindowHandle<T>,
read: impl FnOnce(&T, &AppContext) -> R,
) -> Result<R>
where
T: 'static,
{
let app = self.app.borrow();
app.read_window(window, read)
}
@ -102,8 +105,8 @@ impl TestAppContext {
Ok(())
}
pub fn executor(&self) -> &BackgroundExecutor {
&self.background_executor
pub fn executor(&self) -> BackgroundExecutor {
self.background_executor.clone()
}
pub fn foreground_executor(&self) -> &ForegroundExecutor {