This commit is contained in:
Antonio Scandurra 2023-10-26 16:40:44 +02:00
parent 98d03f6e7a
commit 637cff3ebd
22 changed files with 206 additions and 267 deletions

View file

@ -3,7 +3,7 @@ use crate::{
ModelContext, Result, Task, TestDispatcher, TestPlatform, WindowContext,
};
use parking_lot::Mutex;
use std::{any::Any, future::Future, sync::Arc};
use std::{future::Future, sync::Arc};
#[derive(Clone)]
pub struct TestAppContext {
@ -20,7 +20,7 @@ impl Context for TestAppContext {
build_entity: impl FnOnce(&mut Self::EntityContext<'_, '_, T>) -> T,
) -> Self::Result<Handle<T>>
where
T: Any + Send + Sync,
T: 'static + Send,
{
let mut lock = self.app.lock();
lock.entity(build_entity)