diff options
Diffstat (limited to 'core/runtime.rs')
-rw-r--r-- | core/runtime.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/core/runtime.rs b/core/runtime.rs index 80221295d..704be7a76 100644 --- a/core/runtime.rs +++ b/core/runtime.rs @@ -2317,11 +2317,14 @@ assertEquals(1, notify_return_value); _: (), _: (), ) -> Result<(), AnyError> { - let op_state = op_state.borrow(); - let inner_state = op_state.borrow::<InnerState>(); + let n = { + let op_state = op_state.borrow(); + let inner_state = op_state.borrow::<InnerState>(); + inner_state.0 + }; // Future must be Poll::Pending on first call tokio::time::sleep(std::time::Duration::from_millis(1)).await; - if inner_state.0 != 42 { + if n != 42 { unreachable!(); } Ok(()) |