mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-04 19:29:07 +00:00
Impl AsRef<Path> for Cow<OsStr>
This commit is contained in:
parent
9fb4fcac82
commit
27be4336d9
@ -2002,6 +2002,13 @@ impl AsRef<Path> for OsStr {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[stable(feature = "cow_os_str_as_ref_path", since = "1.8.0")]
|
||||||
|
impl<'a> AsRef<Path> for Cow<'a, OsStr> {
|
||||||
|
fn as_ref(&self) -> &Path {
|
||||||
|
Path::new(self)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
impl AsRef<Path> for OsString {
|
impl AsRef<Path> for OsString {
|
||||||
fn as_ref(&self) -> &Path {
|
fn as_ref(&self) -> &Path {
|
||||||
|
Loading…
Reference in New Issue
Block a user