@@ -94,7 +94,7 @@ impl<'data> BorrowedBuf<'data> {
9494 // SAFETY: We only slice the filled part of the buffer, which is always valid
9595 unsafe {
9696 let buf = self . buf . get_unchecked ( ..self . filled ) ;
97- MaybeUninit :: slice_assume_init_ref ( buf)
97+ buf. assume_init_ref ( )
9898 }
9999 }
100100
@@ -104,7 +104,7 @@ impl<'data> BorrowedBuf<'data> {
104104 // SAFETY: We only slice the filled part of the buffer, which is always valid
105105 unsafe {
106106 let buf = self . buf . get_unchecked_mut ( ..self . filled ) ;
107- MaybeUninit :: slice_assume_init_mut ( buf)
107+ buf. assume_init_mut ( )
108108 }
109109 }
110110
@@ -114,7 +114,7 @@ impl<'data> BorrowedBuf<'data> {
114114 // SAFETY: We only slice the filled part of the buffer, which is always valid
115115 unsafe {
116116 let buf = self . buf . get_unchecked ( ..self . filled ) ;
117- MaybeUninit :: slice_assume_init_ref ( buf)
117+ buf. assume_init_ref ( )
118118 }
119119 }
120120
@@ -124,7 +124,7 @@ impl<'data> BorrowedBuf<'data> {
124124 // SAFETY: We only slice the filled part of the buffer, which is always valid
125125 unsafe {
126126 let buf = self . buf . get_unchecked_mut ( ..self . filled ) ;
127- MaybeUninit :: slice_assume_init_mut ( buf)
127+ buf. assume_init_mut ( )
128128 }
129129 }
130130
@@ -233,7 +233,7 @@ impl<'a> BorrowedCursor<'a> {
233233 // SAFETY: We only slice the initialized part of the buffer, which is always valid
234234 unsafe {
235235 let buf = self . buf . buf . get_unchecked ( self . buf . filled ..self . buf . init ) ;
236- MaybeUninit :: slice_assume_init_ref ( buf)
236+ buf. assume_init_ref ( )
237237 }
238238 }
239239
@@ -243,7 +243,7 @@ impl<'a> BorrowedCursor<'a> {
243243 // SAFETY: We only slice the initialized part of the buffer, which is always valid
244244 unsafe {
245245 let buf = self . buf . buf . get_unchecked_mut ( self . buf . filled ..self . buf . init ) ;
246- MaybeUninit :: slice_assume_init_mut ( buf)
246+ buf. assume_init_mut ( )
247247 }
248248 }
249249
@@ -344,7 +344,7 @@ impl<'a> BorrowedCursor<'a> {
344344
345345 // SAFETY: we do not de-initialize any of the elements of the slice
346346 unsafe {
347- MaybeUninit :: copy_from_slice ( & mut self . as_mut ( ) [ ..buf. len ( ) ] , buf) ;
347+ self . as_mut ( ) [ ..buf. len ( ) ] . write_copy_of_slice ( buf) ;
348348 }
349349
350350 // SAFETY: We just added the entire contents of buf to the filled section.
0 commit comments