mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-17 07:49:29 +00:00
Actually deliver test events to subscribers
This commit is contained in:
parent
81f8e81e48
commit
0e9a82711c
1 changed files with 2 additions and 2 deletions
|
@ -161,8 +161,8 @@ impl TestAppContext {
|
||||||
let (mut tx, rx) = futures::channel::mpsc::unbounded();
|
let (mut tx, rx) = futures::channel::mpsc::unbounded();
|
||||||
entity
|
entity
|
||||||
.update(self, |_, cx: &mut ModelContext<T>| {
|
.update(self, |_, cx: &mut ModelContext<T>| {
|
||||||
cx.subscribe(&entity, move |_, _, event, _| {
|
cx.subscribe(&entity, move |_, _, event, cx| {
|
||||||
let _ = tx.send(event.clone());
|
cx.executor().block(tx.send(event.clone())).unwrap();
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.detach();
|
.detach();
|
||||||
|
|
Loading…
Reference in a new issue