File tree Expand file tree Collapse file tree
tests/all/component_model Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#![ cfg( not( miri) ) ]
22
33use super :: REALLOC_AND_FREE ;
4- use futures:: FutureExt as _;
54use std:: ops:: Deref ;
65use wasmtime:: Result ;
76use 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 {
You can’t perform that action at this time.
0 commit comments