diff --git a/crates/gpui2/src/app/test_context.rs b/crates/gpui2/src/app/test_context.rs index 16d7504b2daec80040f2e1baf4e61a8ee462d303..f590d05c6c9fa49bd8a6fa8c5e386b966d01d33a 100644 --- a/crates/gpui2/src/app/test_context.rs +++ b/crates/gpui2/src/app/test_context.rs @@ -64,8 +64,8 @@ impl TestAppContext { } pub fn update(&self, f: impl FnOnce(&mut AppContext) -> R) -> R { - let mut lock = self.app.lock(); - f(&mut *lock) + let mut cx = self.app.lock(); + cx.update(f) } pub fn read_window( diff --git a/crates/gpui2/src/platform/test/dispatcher.rs b/crates/gpui2/src/platform/test/dispatcher.rs index 7c4af964b08d5b9b61a38c90f38bbd7f8111745a..db70e7e4c130a40cd0b1689b0291ea794f19c300 100644 --- a/crates/gpui2/src/platform/test/dispatcher.rs +++ b/crates/gpui2/src/platform/test/dispatcher.rs @@ -77,7 +77,6 @@ impl TestDispatcher { type Output = (); fn poll(mut self: Pin<&mut Self>, cx: &mut Context) -> Poll { - eprintln!("self.count: {}", self.count); if self.count > 0 { self.count -= 1; cx.waker().wake_by_ref();