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 b4151a4 commit 79e0543Copy full SHA for 79e0543
library/core/src/ffi/c_str.rs
@@ -66,7 +66,7 @@ use crate::str;
66
///
67
/// fn my_string_safe() -> String {
68
/// unsafe {
69
-/// CStr::from_ptr(my_string()).to_string_lossy().into_owned()
+/// String::from_utf8_lossy(CStr::from_ptr(my_string()))
70
/// }
71
72
0 commit comments