From 6ad96825fcd8002c0e4234b020d2eb3ad79232e0 Mon Sep 17 00:00:00 2001 From: Steve Lau Date: Tue, 2 Apr 2024 14:18:31 +0800 Subject: [PATCH 1/2] fix: build on haiku by adding missing import --- library/std/src/sys/pal/unix/thread.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/std/src/sys/pal/unix/thread.rs b/library/std/src/sys/pal/unix/thread.rs index a9ed7e7c75e84..3e3a54c3c745d 100644 --- a/library/std/src/sys/pal/unix/thread.rs +++ b/library/std/src/sys/pal/unix/thread.rs @@ -278,7 +278,7 @@ impl Thread { return None; } let info = tinfo.assume_init(); - let name = slice::from_raw_parts(info.name.as_ptr() as *const u8, info.name.len()); + let name = core::slice::from_raw_parts(info.name.as_ptr() as *const u8, info.name.len()); CStr::from_bytes_until_nul(name).map(CStr::to_owned).ok() } } From bb439900ddaeb9ad7119508f9e1b9c7aa07b9f91 Mon Sep 17 00:00:00 2001 From: Steve Lau Date: Tue, 2 Apr 2024 14:29:38 +0800 Subject: [PATCH 2/2] style: fmt --- library/std/src/sys/pal/unix/thread.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library/std/src/sys/pal/unix/thread.rs b/library/std/src/sys/pal/unix/thread.rs index 3e3a54c3c745d..7d25c974ed363 100644 --- a/library/std/src/sys/pal/unix/thread.rs +++ b/library/std/src/sys/pal/unix/thread.rs @@ -278,7 +278,8 @@ impl Thread { return None; } let info = tinfo.assume_init(); - let name = core::slice::from_raw_parts(info.name.as_ptr() as *const u8, info.name.len()); + let name = + core::slice::from_raw_parts(info.name.as_ptr() as *const u8, info.name.len()); CStr::from_bytes_until_nul(name).map(CStr::to_owned).ok() } }