Skip to content

Commit

Permalink
Inline PathBuf::deref to make it zero cost
Browse files Browse the repository at this point in the history
  • Loading branch information
tesuji committed Jan 10, 2020
1 parent 137a31d commit eca1e8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libstd/path.rs
Expand Up @@ -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)
}
Expand Down

0 comments on commit eca1e8b

Please sign in to comment.