1
Fork 0

Add pathbuf_from_cow_path

This commit is contained in:
George Burton 2018-04-27 20:41:00 +01:00
parent ea8131de53
commit d87b039ea6

View file

@ -1540,6 +1540,14 @@ impl<'a> From<&'a PathBuf> for Cow<'a, Path> {
}
}
#[stable(feature = "pathbuf_from_cow_path", since = "1.28.0")]
impl<'a> From<Cow<'a, Path>> for PathBuf {
#[inline]
fn from(p: Cow<'a, Path>) -> Self {
p.into_owned()
}
}
#[stable(feature = "shared_from_slice2", since = "1.24.0")]
impl From<PathBuf> for Arc<Path> {
#[inline]