diff options
-rw-r--r-- | README.md | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -26,8 +26,8 @@ call: // libc api (unsafe, requires handling return code/errno) pub unsafe extern fn gethostname(name: *mut c_char, len: size_t) -> c_int; -// nix api (returns a nix::Result) -pub fn gethostname(name: &mut [u8]) -> Result<()>; +// nix api (returns a nix::Result<CStr>) +pub fn gethostname<'a>(buffer: &'a mut [u8]) -> Result<&'a CStr>; ``` ## Supported Platforms |