Flush effects when dropping a TestAppContext
This way, at the end of a test, dropped entities will be removed, and will drop the handles that they hold.
This commit is contained in:
@@ -565,6 +565,12 @@ impl TestAppContext {
|
||||
}
|
||||
}
|
||||
|
||||
impl Drop for TestAppContext {
|
||||
fn drop(&mut self) {
|
||||
self.cx.borrow_mut().flush_effects();
|
||||
}
|
||||
}
|
||||
|
||||
impl AsyncAppContext {
|
||||
pub fn spawn<F, Fut, T>(&self, f: F) -> Task<T>
|
||||
where
|
||||
|
||||
Reference in New Issue
Block a user