File tree Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -706,6 +706,14 @@ impl From<Box<CStr>> for CString {
706706 }
707707}
708708
709+ #[ stable( feature = "more_box_slice_clone" , since = "1.29.0" ) ]
710+ impl Clone for Box < CStr > {
711+ #[ inline]
712+ fn clone ( & self ) -> Self {
713+ ( * * self ) . into ( )
714+ }
715+ }
716+
709717#[ stable( feature = "box_from_c_string" , since = "1.20.0" ) ]
710718impl From < CString > for Box < CStr > {
711719 #[ inline]
Original file line number Diff line number Diff line change @@ -642,6 +642,14 @@ impl From<OsString> for Box<OsStr> {
642642 }
643643}
644644
645+ #[ stable( feature = "more_box_slice_clone" , since = "1.29.0" ) ]
646+ impl Clone for Box < OsStr > {
647+ #[ inline]
648+ fn clone ( & self ) -> Self {
649+ self . to_os_string ( ) . into_boxed_os_str ( )
650+ }
651+ }
652+
645653#[ stable( feature = "shared_from_slice2" , since = "1.24.0" ) ]
646654impl From < OsString > for Arc < OsStr > {
647655 #[ inline]
Original file line number Diff line number Diff line change @@ -1410,6 +1410,14 @@ impl From<PathBuf> for Box<Path> {
14101410 }
14111411}
14121412
1413+ #[ stable( feature = "more_box_slice_clone" , since = "1.29.0" ) ]
1414+ impl Clone for Box < Path > {
1415+ #[ inline]
1416+ fn clone ( & self ) -> Self {
1417+ self . to_path_buf ( ) . into_boxed_path ( )
1418+ }
1419+ }
1420+
14131421#[ stable( feature = "rust1" , since = "1.0.0" ) ]
14141422impl < ' a , T : ?Sized + AsRef < OsStr > > From < & ' a T > for PathBuf {
14151423 fn from ( s : & ' a T ) -> PathBuf {
You can’t perform that action at this time.
0 commit comments