File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -818,6 +818,9 @@ impl From<Vec<NonZero<u8>>> for CString {
818
818
impl FromStr for CString {
819
819
type Err = NulError ;
820
820
821
+ /// Converts a string `s` into a [`CString`].
822
+ ///
823
+ /// This method is equivalent to [`CString::new`].
821
824
#[ inline]
822
825
fn from_str ( s : & str ) -> Result < Self , Self :: Err > {
823
826
Self :: new ( s)
@@ -827,6 +830,9 @@ impl FromStr for CString {
827
830
impl TryInto < String > for CString {
828
831
type Error = IntoStringError ;
829
832
833
+ /// Converts the `CString` into a [`String`] if it contains valid UTF-8 data.
834
+ ///
835
+ /// This method is equivalent to [`CString::into_string`].
830
836
#[ inline]
831
837
fn try_into ( self ) -> Result < String , Self :: Error > {
832
838
self . into_string ( )
You can’t perform that action at this time.
0 commit comments