Skip to content

Commit

Permalink
Inline AsRef<Path> for str
Browse files Browse the repository at this point in the history
  • Loading branch information
tesuji committed Jan 10, 2020
1 parent eca1e8b commit ea6bb7f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/libstd/path.rs
Expand Up @@ -2655,6 +2655,7 @@ impl AsRef<Path> for OsString {

#[stable(feature = "rust1", since = "1.0.0")]
impl AsRef<Path> for str {
#[inline]
fn as_ref(&self) -> &Path {
Path::new(self)
}
Expand Down

0 comments on commit ea6bb7f

Please sign in to comment.