From 0a80bb43e5075c9ded49374fc008db7f70965cfe Mon Sep 17 00:00:00 2001 From: gimbles Date: Fri, 6 May 2022 22:51:13 +0530 Subject: [PATCH 1/2] [feat] Make sys::windows::os_str::Slice repr(transparent) --- library/std/src/sys/windows/os_str.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library/std/src/sys/windows/os_str.rs b/library/std/src/sys/windows/os_str.rs index 78e92a3331a1c..7661bc8eb0b6e 100644 --- a/library/std/src/sys/windows/os_str.rs +++ b/library/std/src/sys/windows/os_str.rs @@ -44,7 +44,8 @@ impl fmt::Display for Buf { } } -pub struct Slice { +#[repr(transparent)] +pub(crate) struct Slice { pub inner: Wtf8, } From 3b5fe261febbba990633d0db794307a386bd401c Mon Sep 17 00:00:00 2001 From: gimbles Date: Sat, 7 May 2022 09:22:30 +0530 Subject: [PATCH 2/2] [fix] remove pub(crate) visibility --- library/std/src/sys/windows/os_str.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/std/src/sys/windows/os_str.rs b/library/std/src/sys/windows/os_str.rs index 7661bc8eb0b6e..11883f15022f6 100644 --- a/library/std/src/sys/windows/os_str.rs +++ b/library/std/src/sys/windows/os_str.rs @@ -45,7 +45,7 @@ impl fmt::Display for Buf { } #[repr(transparent)] -pub(crate) struct Slice { +pub struct Slice { pub inner: Wtf8, }