Inline PathBuf::deref to make it zero cost
This commit is contained in:
@@ -1535,7 +1535,7 @@ impl fmt::Debug for PathBuf {
|
|||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
impl ops::Deref for PathBuf {
|
impl ops::Deref for PathBuf {
|
||||||
type Target = Path;
|
type Target = Path;
|
||||||
|
#[inline]
|
||||||
fn deref(&self) -> &Path {
|
fn deref(&self) -> &Path {
|
||||||
Path::new(&self.inner)
|
Path::new(&self.inner)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user