Skip to content

Commit eddd29f

Browse files
committed
Change write_slice() to copy_from_slice()
To follow API update[1], change MaybeUninit::write_slice() to copy_from_slice(). [1]: rust-lang/rust#116385
1 parent b743e60 commit eddd29f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ impl OwnedCursor {
532532

533533
// SAFETY: we do not de-initialize any of the elements of the slice
534534
unsafe {
535-
MaybeUninit::write_slice(&mut self.as_mut()[..data.len()], data);
535+
MaybeUninit::copy_from_slice(&mut self.as_mut()[..data.len()], data);
536536
}
537537

538538
// SAFETY: We just added the entire contents of data.

0 commit comments

Comments
 (0)