]> git.lizzy.rs Git - rust.git/blobdiff - src/libstd/path.rs
Auto merge of #68522 - estebank:impl-trait-sugg-2, r=oli-obk
[rust.git] / src / libstd / path.rs
index 7ea642942dd74b5c766ccbc02516ed08b307150e..a703cb748e06b4e111d7f649e9444809c7dec470 100644 (file)
@@ -1475,6 +1475,7 @@ impl From<OsString> for PathBuf {
     /// Converts a `OsString` into a `PathBuf`
     ///
     /// This conversion does not allocate or copy memory.
+    #[inline]
     fn from(s: OsString) -> PathBuf {
         PathBuf { inner: s }
     }
@@ -2670,6 +2671,7 @@ fn as_ref(&self) -> &Path {
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl AsRef<Path> for PathBuf {
+    #[inline]
     fn as_ref(&self) -> &Path {
         self
     }