From eca1e8bd9beeaabbc240ad342892f26998ad7f35 Mon Sep 17 00:00:00 2001 From: Lzu Tao Date: Fri, 10 Jan 2020 18:48:15 +0000 Subject: [PATCH] Inline PathBuf::deref to make it zero cost --- src/libstd/path.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libstd/path.rs b/src/libstd/path.rs index fbbdc1ddac29..f00ef2693092 100644 --- a/src/libstd/path.rs +++ b/src/libstd/path.rs @@ -1535,7 +1535,7 @@ impl fmt::Debug for PathBuf { #[stable(feature = "rust1", since = "1.0.0")] impl ops::Deref for PathBuf { type Target = Path; - + #[inline] fn deref(&self) -> &Path { Path::new(&self.inner) }