File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -522,6 +522,13 @@ impl ToOwned for CStr {
522522 }
523523}
524524
525+ #[ unstable( feature = "cstring_asref" , reason = "recently added" , issue = "0" ) ]
526+ impl < ' a > From < & ' a CStr > for CString {
527+ fn from ( s : & ' a CStr ) -> CString {
528+ s. to_owned ( )
529+ }
530+ }
531+
525532#[ unstable( feature = "cstring_asref" , reason = "recently added" , issue = "0" ) ]
526533impl ops:: Index < ops:: RangeFull > for CString {
527534 type Output = CStr ;
@@ -532,13 +539,6 @@ impl ops::Index<ops::RangeFull> for CString {
532539 }
533540}
534541
535- #[ unstable( feature = "cstring_asref" , reason = "recently added" , issue = "0" ) ]
536- impl < ' a , T : ?Sized + AsRef < CStr > > From < & ' a T > for CString {
537- fn from ( s : & ' a T ) -> CString {
538- s. as_ref ( ) . to_owned ( )
539- }
540- }
541-
542542#[ unstable( feature = "cstring_asref" , reason = "recently added" , issue = "0" ) ]
543543impl AsRef < CStr > for CStr {
544544 fn as_ref ( & self ) -> & CStr {
You can’t perform that action at this time.
0 commit comments