Skip to content

Commit 6cb2f03

Browse files
committed
Convert [u8] to [i8] in test
1 parent 8e870c8 commit 6cb2f03

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

library/std/src/fs/tests.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1782,6 +1782,7 @@ fn windows_unix_socket_exists() {
17821782
}
17831783
let mut addr = c::SOCKADDR_UN { sun_family: c::AF_UNIX, sun_path: mem::zeroed() };
17841784
let bytes = socket_path.as_os_str().as_encoded_bytes();
1785+
let bytes = core::slice::from_raw_parts(bytes.as_ptr().cast::<i8>(), bytes.len());
17851786
addr.sun_path[..bytes.len()].copy_from_slice(bytes);
17861787
let len = mem::size_of_val(&addr) as i32;
17871788
let result = c::bind(socket, ptr::addr_of!(addr).cast::<c::SOCKADDR>(), len);

0 commit comments

Comments
 (0)