In the current API, CString::new takes a *const i8, but it has a method as_mut_ptr which returns a *mut i8.
The as_mut_ptr method seems to violate the invariant that the new method is trying to impose.
Perhaps we need CString and MutCString, as well as MutCString::to_c_string?
In the current API,
CString::newtakes a*const i8, but it has a methodas_mut_ptrwhich returns a*mut i8.The
as_mut_ptrmethod seems to violate the invariant that thenewmethod is trying to impose.Perhaps we need
CStringandMutCString, as well asMutCString::to_c_string?