File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change 160160//! [`from_wide`]: crate::os::windows::ffi::OsStringExt::from_wide "os::windows::ffi::OsStringExt::from_wide"
161161
162162#![ stable( feature = "rust1" , since = "1.0.0" ) ]
163- #![ allow( unsafe_op_in_unsafe_fn) ]
164163
165164#[ unstable( feature = "c_str_module" , issue = "112134" ) ]
166165pub mod c_str;
Original file line number Diff line number Diff line change @@ -184,7 +184,7 @@ impl OsString {
184184 #[ inline]
185185 #[ stable( feature = "os_str_bytes" , since = "1.74.0" ) ]
186186 pub unsafe fn from_encoded_bytes_unchecked ( bytes : Vec < u8 > ) -> Self {
187- OsString { inner : Buf :: from_encoded_bytes_unchecked ( bytes) }
187+ OsString { inner : unsafe { Buf :: from_encoded_bytes_unchecked ( bytes) } }
188188 }
189189
190190 /// Converts to an [`OsStr`] slice.
@@ -813,7 +813,7 @@ impl OsStr {
813813 #[ inline]
814814 #[ stable( feature = "os_str_bytes" , since = "1.74.0" ) ]
815815 pub unsafe fn from_encoded_bytes_unchecked ( bytes : & [ u8 ] ) -> & Self {
816- Self :: from_inner ( Slice :: from_encoded_bytes_unchecked ( bytes) )
816+ Self :: from_inner ( unsafe { Slice :: from_encoded_bytes_unchecked ( bytes) } )
817817 }
818818
819819 #[ inline]
You can’t perform that action at this time.
0 commit comments