We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5ca44de commit 6c8038dCopy full SHA for 6c8038d
library/alloc/src/ffi/c_str.rs
@@ -824,6 +824,15 @@ impl FromStr for CString {
824
}
825
826
827
+impl TryInto<String> for CString {
828
+ type Error = IntoStringError;
829
+
830
+ #[inline]
831
+ fn try_into(self) -> Result<String, Self::Error> {
832
+ self.into_string()
833
+ }
834
+}
835
836
#[cfg(not(test))]
837
#[stable(feature = "more_box_slice_clone", since = "1.29.0")]
838
impl Clone for Box<CStr> {
0 commit comments