Closed
Description
These functions are just so simple that they could easily be adapted not to fail. These API entires are not very beautiful right now, so the additional syntactic overhead of dealing with the result shouldn't be a big deal.
Possible API:
fn new(buf: *const i8, owns_buffer: bool) -> Result<CString, ()>
fn to_c_str(&self) -> Result<CString, ()>
fn with_c_str<T>(&self, f: |*const i8| -> T) -> Result<T, ()>
Metadata
Metadata
Assignees
Labels
No labels