Implement From for more types on Cow
This commit is contained in:
@@ -1532,6 +1532,14 @@ impl<'a> From<PathBuf> for Cow<'a, Path> {
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "cow_from_pathbuf_ref", since = "1.28.0")]
|
||||
impl<'a> From<&'a PathBuf> for Cow<'a, Path> {
|
||||
#[inline]
|
||||
fn from(p: &'a PathBuf) -> Cow<'a, Path> {
|
||||
Cow::Borrowed(p.as_path())
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "shared_from_slice2", since = "1.24.0")]
|
||||
impl From<PathBuf> for Arc<Path> {
|
||||
#[inline]
|
||||
|
||||
Reference in New Issue
Block a user