parent
5fdcd3aa38
commit
cdff2f3b30
|
@ -706,6 +706,14 @@ impl From<Box<CStr>> for CString {
|
|||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "more_box_slice_clone", since = "1.29.0")]
|
||||
impl Clone for Box<CStr> {
|
||||
#[inline]
|
||||
fn clone(&self) -> Self {
|
||||
(**self).into()
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "box_from_c_string", since = "1.20.0")]
|
||||
impl From<CString> for Box<CStr> {
|
||||
#[inline]
|
||||
|
|
|
@ -628,6 +628,14 @@ impl From<OsString> for Box<OsStr> {
|
|||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "more_box_slice_clone", since = "1.29.0")]
|
||||
impl Clone for Box<OsStr> {
|
||||
#[inline]
|
||||
fn clone(&self) -> Self {
|
||||
self.to_os_string().into_boxed_os_str()
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "shared_from_slice2", since = "1.24.0")]
|
||||
impl From<OsString> for Arc<OsStr> {
|
||||
#[inline]
|
||||
|
|
|
@ -1410,6 +1410,14 @@ impl From<PathBuf> for Box<Path> {
|
|||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "more_box_slice_clone", since = "1.29.0")]
|
||||
impl Clone for Box<Path> {
|
||||
#[inline]
|
||||
fn clone(&self) -> Self {
|
||||
self.to_path_buf().into_boxed_path()
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
impl<'a, T: ?Sized + AsRef<OsStr>> From<&'a T> for PathBuf {
|
||||
fn from(s: &'a T) -> PathBuf {
|
||||
|
|
Loading…
Reference in New Issue