Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Actually deliver test events to subscribers

Conrad Irwin0e9a82711cc8
diff --git a/crates/gpui2/src/app/test_context.rs b/crates/gpui2/src/app/test_context.rs
index f590d05c6c9..00712eba50b 100644
--- a/crates/gpui2/src/app/test_context.rs
+++ b/crates/gpui2/src/app/test_context.rs
@@ -161,8 +161,8 @@ impl TestAppContext {
let (mut tx, rx) = futures::channel::mpsc::unbounded();
entity
.update(self, |_, cx: &mut ModelContext<T>| {
- cx.subscribe(&entity, move |_, _, event, _| {
- let _ = tx.send(event.clone());
+ cx.subscribe(&entity, move |_, _, event, cx| {
+ cx.executor().block(tx.send(event.clone())).unwrap();
})
})
.detach();