1
Fork 0

Inline AsRef<Path> for str

This commit is contained in:
Lzu Tao 2020-01-10 18:56:30 +00:00
parent eca1e8bd9b
commit ea6bb7fe17

View file

@ -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)
}