Skip to content

Commit 8cfc8a5

Browse files
committed
psx/std: Fix name of unstable MaybeUninit method
1 parent 790ecd9 commit 8cfc8a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

psx/src/std.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ impl<T: AsRef<[u8]>> AsCStr for T {
3434
let mut uninitialized = MaybeUninit::uninit_array::<MAX_LEN>();
3535
// Initialize the CStr with the input string
3636
let initialized_part = &mut uninitialized[0..slice.len() + 1];
37-
MaybeUninit::write_slice(&mut initialized_part[0..slice.len()], slice);
37+
MaybeUninit::copy_from_slice(&mut initialized_part[0..slice.len()], slice);
3838
// Add a null-terminator to the CStr
3939
initialized_part[slice.len()].write(0);
4040
// SAFETY: The initialized portion of the CStr on the stack was explicitly

0 commit comments

Comments
 (0)