File tree 2 files changed +2
-3
lines changed
2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change 160
160
//! [`from_wide`]: crate::os::windows::ffi::OsStringExt::from_wide "os::windows::ffi::OsStringExt::from_wide"
161
161
162
162
#![ stable( feature = "rust1" , since = "1.0.0" ) ]
163
- #![ allow( unsafe_op_in_unsafe_fn) ]
164
163
165
164
#[ unstable( feature = "c_str_module" , issue = "112134" ) ]
166
165
pub mod c_str;
Original file line number Diff line number Diff line change @@ -184,7 +184,7 @@ impl OsString {
184
184
#[ inline]
185
185
#[ stable( feature = "os_str_bytes" , since = "1.74.0" ) ]
186
186
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) } }
188
188
}
189
189
190
190
/// Converts to an [`OsStr`] slice.
@@ -813,7 +813,7 @@ impl OsStr {
813
813
#[ inline]
814
814
#[ stable( feature = "os_str_bytes" , since = "1.74.0" ) ]
815
815
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) } )
817
817
}
818
818
819
819
#[ inline]
You can’t perform that action at this time.
0 commit comments