File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -682,6 +682,14 @@ impl Borrow<CStr> for CString {
682
682
fn borrow ( & self ) -> & CStr { self }
683
683
}
684
684
685
+ #[ stable( feature = "cstring_from_cow_cstr" , since = "1.28.0" ) ]
686
+ impl < ' a > From < Cow < ' a , CStr > > for CString {
687
+ #[ inline]
688
+ fn from ( s : Cow < ' a , CStr > ) -> Self {
689
+ s. into_owned ( )
690
+ }
691
+ }
692
+
685
693
#[ stable( feature = "box_from_c_str" , since = "1.17.0" ) ]
686
694
impl < ' a > From < & ' a CStr > for Box < CStr > {
687
695
fn from ( s : & ' a CStr ) -> Box < CStr > {
Original file line number Diff line number Diff line change @@ -688,6 +688,14 @@ impl<'a> From<&'a OsString> for Cow<'a, OsStr> {
688
688
}
689
689
}
690
690
691
+ #[ stable( feature = "osstring_from_cow_osstr" , since = "1.28.0" ) ]
692
+ impl < ' a > From < Cow < ' a , OsStr > > for OsString {
693
+ #[ inline]
694
+ fn from ( s : Cow < ' a , OsStr > ) -> Self {
695
+ s. into_owned ( )
696
+ }
697
+ }
698
+
691
699
#[ stable( feature = "box_default_extra" , since = "1.17.0" ) ]
692
700
impl Default for Box < OsStr > {
693
701
fn default ( ) -> Box < OsStr > {
You can’t perform that action at this time.
0 commit comments