Skip to content
Permalink
Browse files

Null pointers are optional

  • Loading branch information...
oli-obk committed Sep 10, 2019
1 parent 298f8ee commit 4c4a7b44aaec7b2cac71bef766119bc55296c913
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/libstd/ffi/c_str.rs
@@ -137,7 +137,8 @@ pub struct CString {
///
/// Note that this structure is `repr(C)` and is can be
/// placed in the signatures of FFI functions. A `&CStr` is equivalent to `*const c_char`,
/// but offers a richer API.
/// but offers a richer API. If you want to handle null pointers, too, using an
/// `Option<&CStr>` will work, too.
///
/// # Examples
///

0 comments on commit 4c4a7b4

Please sign in to comment.
You can’t perform that action at this time.