Inline PathBuf::deref to make it zero cost
This commit is contained in:
parent
137a31d692
commit
eca1e8bd9b
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue