Clarify docs on CString.unwrap()
CString.unwrap() drops ownership of the buffer on the floor. Put this in the docs.
This commit is contained in:
parent
927aff1724
commit
1e4f13f95f
1 changed files with 1 additions and 0 deletions
|
@ -34,6 +34,7 @@ impl CString {
|
|||
}
|
||||
|
||||
/// Unwraps the wrapped `*libc::c_char` from the `CString` wrapper.
|
||||
/// Any ownership of the buffer by the `CString` wrapper is forgotten.
|
||||
pub unsafe fn unwrap(self) -> *libc::c_char {
|
||||
let mut c_str = self;
|
||||
c_str.owns_buffer_ = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue