@@ -76,13 +76,13 @@ pub unsafe fn forward_to_debug(iovs: *const wasi::Ciovec, len: i32, res: *mut wa
7676}
7777
7878thread_local ! {
79- static RNG : RefCell <rand:: rngs:: StdRng > = RefCell :: new( rand:: rngs:: StdRng :: from_seed( [ 0 ; 32 ] ) ) ;
79+ pub static RNG : RefCell <rand:: rngs:: StdRng > = RefCell :: new( rand:: rngs:: StdRng :: from_seed( [ 0 ; 32 ] ) ) ;
8080
8181 pub static FS : RefCell <FileSystem > = RefCell :: new(
8282 FileSystem :: new( Box :: new( DummyStorage :: new( ) ) ) . unwrap( )
8383 ) ;
8484
85- static ENV : RefCell <Environment > = RefCell :: new( Environment :: new( ) ) ;
85+ pub static ENV : RefCell <Environment > = RefCell :: new( Environment :: new( ) ) ;
8686}
8787
8888#[ allow( unused_macros) ]
@@ -137,7 +137,7 @@ pub unsafe extern "C" fn __ic_custom_fd_write(
137137 {
138138 let lengths: Vec < _ > = src_io_vec. iter ( ) . map ( |x| x. len ) . collect ( ) ;
139139
140- let l = format ! ( "iovs.lengths={:?}" , lengths ) ;
140+ let l = format ! ( "iovs.lengths={lengths :?}" ) ;
141141 debug_instructions ! ( "__ic_custom_fd_write" , "fd={fd:?} iovs.len={len:?} {l}" ) ;
142142 }
143143
@@ -191,7 +191,7 @@ pub unsafe extern "C" fn __ic_custom_fd_read(
191191 #[ cfg( feature = "report_wasi_calls" ) ]
192192 {
193193 let lengths: Vec < _ > = dst_io_vec. iter ( ) . map ( |x : & DstBuf | x. len ) . collect ( ) ;
194- let l = format ! ( "iovs.lengths={:?}" , lengths ) ;
194+ let l = format ! ( "iovs.lengths={lengths :?}" ) ;
195195
196196 debug_instructions ! ( "__ic_custom_fd_read" , "fd={fd:?} iovs.lengths={l}" ) ;
197197 }
@@ -248,7 +248,7 @@ pub unsafe extern "C" fn __ic_custom_fd_pwrite(
248248 #[ cfg( feature = "report_wasi_calls" ) ]
249249 {
250250 let lengths: Vec < _ > = src_io_vec. iter ( ) . map ( |x : & SrcBuf | x. len ) . collect ( ) ;
251- let l = format ! ( "iovs.lengths={:?}" , lengths ) ;
251+ let l = format ! ( "iovs.lengths={lengths :?}" ) ;
252252 debug_instructions ! (
253253 "__ic_custom_fd_pwrite" ,
254254 "fd={fd:?} iovs.len={len:?} offset={offset} iovs.lengths={l}"
@@ -305,7 +305,7 @@ pub unsafe extern "C" fn __ic_custom_fd_pread(
305305 #[ cfg( feature = "report_wasi_calls" ) ]
306306 {
307307 let lengths: Vec < _ > = dst_io_vec. iter ( ) . map ( |x : & DstBuf | x. len ) . collect ( ) ;
308- let l = format ! ( "iovs.lengths={:?}" , lengths ) ;
308+ let l = format ! ( "iovs.lengths={lengths :?}" ) ;
309309
310310 debug_instructions ! (
311311 "__ic_custom_fd_pread" ,
@@ -1012,10 +1012,7 @@ pub unsafe extern "C" fn __ic_custom_fd_readdir(
10121012
10131013 #[ cfg( feature = "report_wasi_calls" ) ]
10141014 {
1015- let mn = std:: cmp:: min (
1016- std:: cmp:: min ( bytes_len as usize , unsafe { * res } as usize ) ,
1017- 50 ,
1018- ) ;
1015+ let mn = std:: cmp:: min ( std:: cmp:: min ( bytes_len as usize , unsafe { * res } ) , 50 ) ;
10191016 let buf = unsafe { std:: slice:: from_raw_parts_mut ( bytes, mn) } ;
10201017
10211018 let t = format ! ( "buf={buf:?}... res={}" , unsafe { * res } ) ;
0 commit comments