Inline std::os::unix::ffi::OsStringExt methods

This commit is contained in:
Konrad Borowski 2022-01-11 19:31:36 +01:00
parent 4a7fb971c9
commit 7e6d97bc39

View File

@ -28,9 +28,11 @@ pub trait OsStringExt: Sealed {
#[stable(feature = "rust1", since = "1.0.0")]
impl OsStringExt for OsString {
#[inline]
fn from_vec(vec: Vec<u8>) -> OsString {
FromInner::from_inner(Buf { inner: vec })
}
#[inline]
fn into_vec(self) -> Vec<u8> {
self.into_inner().inner
}