Skip to content

Commit a37c33b

Browse files
Mark unix::ffi::OsStrExt methods as inline
1 parent f717b58 commit a37c33b

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/libstd/ffi/os_str.rs

+1
Original file line numberDiff line numberDiff line change
@@ -960,6 +960,7 @@ impl IntoInner<Buf> for OsString {
960960
}
961961

962962
impl AsInner<Slice> for OsStr {
963+
#[inline]
963964
fn as_inner(&self) -> &Slice {
964965
&self.inner
965966
}

src/libstd/sys_common/os_str_bytes.rs

+2
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,11 @@ pub trait OsStrExt {
236236

237237
#[stable(feature = "rust1", since = "1.0.0")]
238238
impl OsStrExt for OsStr {
239+
#[inline]
239240
fn from_bytes(slice: &[u8]) -> &OsStr {
240241
unsafe { mem::transmute(slice) }
241242
}
243+
#[inline]
242244
fn as_bytes(&self) -> &[u8] {
243245
&self.as_inner().inner
244246
}

0 commit comments

Comments
 (0)