1
Fork 0

Inline impl From<OsString> for PathBuf

This commit is contained in:
Lzu Tao 2020-01-10 19:02:14 +00:00
parent ea6bb7fe17
commit bf1d20c4b6

View file

@ -1475,6 +1475,7 @@ impl From<OsString> for PathBuf {
/// Converts a `OsString` into a `PathBuf` /// Converts a `OsString` into a `PathBuf`
/// ///
/// This conversion does not allocate or copy memory. /// This conversion does not allocate or copy memory.
#[inline]
fn from(s: OsString) -> PathBuf { fn from(s: OsString) -> PathBuf {
PathBuf { inner: s } PathBuf { inner: s }
} }