File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed
Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -486,7 +486,7 @@ pub(crate) fn init<T>(linker: &mut wasmtime::Linker<T>) -> Result<()> {
486486 let result = unsafe {
487487 hermit_abi:: read (
488488 fd,
489- MaybeUninit :: slice_assume_init_mut ( & mut data[ .. ] ) . as_mut_ptr ( ) ,
489+ data. assume_init_mut ( ) . as_mut_ptr ( ) ,
490490 len. try_into ( ) . unwrap ( ) ,
491491 )
492492 } ;
@@ -496,9 +496,7 @@ pub(crate) fn init<T>(linker: &mut wasmtime::Linker<T>) -> Result<()> {
496496 let _ = mem. write (
497497 caller. as_context_mut ( ) ,
498498 iovs[ i] . try_into ( ) . unwrap ( ) ,
499- unsafe {
500- MaybeUninit :: slice_assume_init_ref ( & data[ ..result as usize ] )
501- } ,
499+ unsafe { data[ ..result as usize ] . assume_init_ref ( ) } ,
502500 ) ;
503501
504502 nread_bytes += result as i32 ;
@@ -617,12 +615,12 @@ pub(crate) fn init<T>(linker: &mut wasmtime::Linker<T>) -> Result<()> {
617615
618616 let _ =
619617 mem. read ( caller. as_context ( ) , iovs[ i] . try_into ( ) . unwrap ( ) , unsafe {
620- MaybeUninit :: slice_assume_init_mut ( & mut data[ .. ] )
618+ data. assume_init_mut ( )
621619 } ) ;
622620 let result = unsafe {
623621 hermit_abi:: write (
624622 fd,
625- MaybeUninit :: slice_assume_init_ref ( & data[ .. ] ) . as_ptr ( ) ,
623+ data. assume_init_ref ( ) . as_ptr ( ) ,
626624 len. try_into ( ) . unwrap ( ) ,
627625 )
628626 } ;
Original file line number Diff line number Diff line change 11[toolchain ]
2- channel = " nightly-2025-01 -01"
2+ channel = " nightly-2025-04 -01"
33components = [ " rust-src" ]
You can’t perform that action at this time.
0 commit comments