Mark unix::ffi::OsStrExt methods as inline
This commit is contained in:
parent
f717b58dd7
commit
a37c33b926
@ -960,6 +960,7 @@ impl IntoInner<Buf> for OsString {
|
||||
}
|
||||
|
||||
impl AsInner<Slice> for OsStr {
|
||||
#[inline]
|
||||
fn as_inner(&self) -> &Slice {
|
||||
&self.inner
|
||||
}
|
||||
|
@ -236,9 +236,11 @@ pub trait OsStrExt {
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
impl OsStrExt for OsStr {
|
||||
#[inline]
|
||||
fn from_bytes(slice: &[u8]) -> &OsStr {
|
||||
unsafe { mem::transmute(slice) }
|
||||
}
|
||||
#[inline]
|
||||
fn as_bytes(&self) -> &[u8] {
|
||||
&self.as_inner().inner
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user