diff options
| author | Konrad Borowski <konrad@borowski.pw> | 2019-04-04 10:51:18 +0200 |
|---|---|---|
| committer | Konrad Borowski <konrad@borowski.pw> | 2019-04-04 10:55:31 +0200 |
| commit | a37c33b9261f534b56434c83258ff24d24bf9351 (patch) | |
| tree | 2470923785af4f73961521c3d6616860fea8173d /src/libstd/sys_common/os_str_bytes.rs | |
| parent | f717b58dd70829f105960a071c7992b440720482 (diff) | |
| download | rust-a37c33b9261f534b56434c83258ff24d24bf9351.tar.gz rust-a37c33b9261f534b56434c83258ff24d24bf9351.zip | |
Mark unix::ffi::OsStrExt methods as inline
Diffstat (limited to 'src/libstd/sys_common/os_str_bytes.rs')
| -rw-r--r-- | src/libstd/sys_common/os_str_bytes.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libstd/sys_common/os_str_bytes.rs b/src/libstd/sys_common/os_str_bytes.rs index 7cc93477a73..a4961974d89 100644 --- a/src/libstd/sys_common/os_str_bytes.rs +++ b/src/libstd/sys_common/os_str_bytes.rs @@ -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 } |
