File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -779,8 +779,8 @@ fn test_arraystring_zero_filled_has_some_sanity_checks() {
779779#[ test]
780780fn test_array_vec_from_parts ( ) {
781781 let mut xs = [ MaybeUninit :: < u8 > :: uninit ( ) ; 4 ] ;
782- xs[ 0 ] . write ( 1 ) ;
783- xs[ 1 ] . write ( 2 ) ;
782+ xs[ 0 ] = MaybeUninit :: new ( 1 ) ;
783+ xs[ 1 ] = MaybeUninit :: new ( 2 ) ;
784784
785785 // # Safety - we have initialized 2 elements in xs
786786 let array = unsafe { ArrayVec :: from_raw_parts ( xs, 2 ) } ;
@@ -791,9 +791,9 @@ fn test_array_vec_from_parts() {
791791#[ test]
792792fn test_array_str_from_parts ( ) {
793793 let mut xs = [ MaybeUninit :: < u8 > :: uninit ( ) ; 4 ] ;
794- xs[ 0 ] . write ( b'a' ) ;
795- xs[ 1 ] . write ( b'b' ) ;
796- xs[ 2 ] . write ( b'c' ) ;
794+ xs[ 0 ] = MaybeUninit :: new ( b'a' ) ;
795+ xs[ 1 ] = MaybeUninit :: new ( b'b' ) ;
796+ xs[ 2 ] = MaybeUninit :: new ( b'c' ) ;
797797
798798 // # Safety - we have initialized 3 elements in xs
799799 let array = unsafe { ArrayString :: from_raw_parts ( xs, 3 ) } ;
You can’t perform that action at this time.
0 commit comments