File tree 1 file changed +3
-0
lines changed
1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -915,6 +915,7 @@ impl From<CString> for Box<CStr> {
915
915
916
916
#[ stable( feature = "cow_from_cstr" , since = "1.28.0" ) ]
917
917
impl < ' a > From < CString > for Cow < ' a , CStr > {
918
+ /// Converts a [`CString`] into an owned [`Cow`] without copying or allocating.
918
919
#[ inline]
919
920
fn from ( s : CString ) -> Cow < ' a , CStr > {
920
921
Cow :: Owned ( s)
@@ -923,6 +924,7 @@ impl<'a> From<CString> for Cow<'a, CStr> {
923
924
924
925
#[ stable( feature = "cow_from_cstr" , since = "1.28.0" ) ]
925
926
impl < ' a > From < & ' a CStr > for Cow < ' a , CStr > {
927
+ /// Converts a [`CStr`] into a borrowed [`Cow`] without copying or allocating.
926
928
#[ inline]
927
929
fn from ( s : & ' a CStr ) -> Cow < ' a , CStr > {
928
930
Cow :: Borrowed ( s)
@@ -931,6 +933,7 @@ impl<'a> From<&'a CStr> for Cow<'a, CStr> {
931
933
932
934
#[ stable( feature = "cow_from_cstr" , since = "1.28.0" ) ]
933
935
impl < ' a > From < & ' a CString > for Cow < ' a , CStr > {
936
+ /// Converts a `&`[`CString`] into a borrowed [`Cow`] without copying or allocating.
934
937
#[ inline]
935
938
fn from ( s : & ' a CString ) -> Cow < ' a , CStr > {
936
939
Cow :: Borrowed ( s. as_c_str ( ) )
You can’t perform that action at this time.
0 commit comments