Skip to content

Commit 0caa098

Browse files
committed
more cleanup
1 parent ea93cdb commit 0caa098

1 file changed

Lines changed: 12 additions & 11 deletions

File tree

tests/all/component_model/import.rs

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#![cfg(not(miri))]
22

33
use super::REALLOC_AND_FREE;
4-
use futures::FutureExt as _;
54
use std::ops::Deref;
65
use wasmtime::Result;
76
use wasmtime::component::*;
@@ -758,11 +757,12 @@ async fn test_stack_and_heap_args_and_rets(concurrent: bool) -> Result<()> {
758757
WasmStr,
759758
WasmStr,
760759
),)| {
761-
accessor
762-
.with(|v| assert_eq!(arg.0.to_str(&v).unwrap(), "abc"))
763-
.now_or_never()
764-
.expect("`Accessor::with` resolves synchronously");
765-
Box::pin(async { Ok((3u32,)) })
760+
Box::pin(async move {
761+
accessor
762+
.with(|v| assert_eq!(arg.0.to_str(&v).unwrap(), "abc"))
763+
.await;
764+
Ok((3u32,))
765+
})
766766
},
767767
)?;
768768
linker
@@ -785,11 +785,12 @@ async fn test_stack_and_heap_args_and_rets(concurrent: bool) -> Result<()> {
785785
WasmStr,
786786
WasmStr,
787787
),)| {
788-
accessor
789-
.with(|v| assert_eq!(arg.0.to_str(&v).unwrap(), "abc"))
790-
.now_or_never()
791-
.expect("`Accessor::with` resolves synchronously");
792-
Box::pin(async { Ok(("xyz".to_string(),)) })
788+
Box::pin(async move {
789+
accessor
790+
.with(|v| assert_eq!(arg.0.to_str(&v).unwrap(), "abc"))
791+
.await;
792+
Ok(("xyz".to_string(),))
793+
})
793794
},
794795
)?;
795796
} else {

0 commit comments

Comments
 (0)