Skip to content

Commit eca1e8b

Browse files
committed
Inline PathBuf::deref to make it zero cost
1 parent 137a31d commit eca1e8b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libstd/path.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1535,7 +1535,7 @@ impl fmt::Debug for PathBuf {
15351535
#[stable(feature = "rust1", since = "1.0.0")]
15361536
impl ops::Deref for PathBuf {
15371537
type Target = Path;
1538-
1538+
#[inline]
15391539
fn deref(&self) -> &Path {
15401540
Path::new(&self.inner)
15411541
}

0 commit comments

Comments
 (0)