Skip to content
This repository was archived by the owner on Sep 8, 2025. It is now read-only.

Commit 7e86fd8

Browse files
committed
Fix a failing test
1 parent 3a644f0 commit 7e86fd8

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

crates/wasmtime/src/runtime/store/async_.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use crate::store::{ResourceLimiterInner, StoreInner, StoreOpaque};
44
#[cfg(feature = "call-hook")]
55
use crate::CallHook;
66
use crate::{Engine, Store, StoreContextMut, UpdateDeadline};
7+
use anyhow::Context as _;
78
use core::cell::UnsafeCell;
89
use core::future::Future;
910
use core::ops::Range;
@@ -230,7 +231,7 @@ impl<T> StoreInner<T> {
230231
#[cfg(feature = "component-model-async")]
231232
{
232233
let async_cx = crate::component::concurrent::AsyncCx::try_new(self)
233-
.expect("couldn't create AsyncCx to block on async operation");
234+
.context("couldn't create AsyncCx to block on async operation")?;
234235
let future = mk_future(self);
235236
let mut future = core::pin::pin!(future);
236237
unsafe { Ok(async_cx.block_on(future.as_mut(), None)?.0) }
@@ -240,7 +241,7 @@ impl<T> StoreInner<T> {
240241
let cx = self
241242
.inner
242243
.async_cx()
243-
.expect("async_cx is not present to block on async operation");
244+
.context("async_cx is not present to block on async operation")?;
244245
let future = mk_future(self);
245246
let mut future = core::pin::pin!(future);
246247
unsafe { cx.block_on(future.as_mut()) }

0 commit comments

Comments
 (0)