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 {
522
522
}
523
523
}
524
524
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
+
525
532
#[ unstable( feature = "cstring_asref" , reason = "recently added" , issue = "0" ) ]
526
533
impl ops:: Index < ops:: RangeFull > for CString {
527
534
type Output = CStr ;
@@ -532,13 +539,6 @@ impl ops::Index<ops::RangeFull> for CString {
532
539
}
533
540
}
534
541
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
-
542
542
#[ unstable( feature = "cstring_asref" , reason = "recently added" , issue = "0" ) ]
543
543
impl AsRef < CStr > for CStr {
544
544
fn as_ref ( & self ) -> & CStr {
You can’t perform that action at this time.
0 commit comments