Skip to content

Commit 1b241bb

Browse files
authored
Rollup merge of #92775 - xfix:osstringext-inline, r=m-ou-se
Inline std::os::unix::ffi::OsStringExt methods Those methods essentially do nothing at assembly level. On Unix systems, `OsString` is represented as a `Vec` without performing any transformations.
2 parents ff1db43 + 7e6d97b commit 1b241bb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

library/std/src/os/unix/ffi/os_str.rs

+2
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,11 @@ pub trait OsStringExt: Sealed {
2828

2929
#[stable(feature = "rust1", since = "1.0.0")]
3030
impl OsStringExt for OsString {
31+
#[inline]
3132
fn from_vec(vec: Vec<u8>) -> OsString {
3233
FromInner::from_inner(Buf { inner: vec })
3334
}
35+
#[inline]
3436
fn into_vec(self) -> Vec<u8> {
3537
self.into_inner().inner
3638
}

0 commit comments

Comments
 (0)