We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f717b58 commit a37c33bCopy full SHA for a37c33b
src/libstd/ffi/os_str.rs
@@ -960,6 +960,7 @@ impl IntoInner<Buf> for OsString {
960
}
961
962
impl AsInner<Slice> for OsStr {
963
+ #[inline]
964
fn as_inner(&self) -> &Slice {
965
&self.inner
966
src/libstd/sys_common/os_str_bytes.rs
@@ -236,9 +236,11 @@ pub trait OsStrExt {
236
237
#[stable(feature = "rust1", since = "1.0.0")]
238
impl OsStrExt for OsStr {
239
240
fn from_bytes(slice: &[u8]) -> &OsStr {
241
unsafe { mem::transmute(slice) }
242
243
244
fn as_bytes(&self) -> &[u8] {
245
&self.as_inner().inner
246
0 commit comments