diff --git a/README.md b/README.md index 577a0fb2cc..7315586c5d 100644 --- a/README.md +++ b/README.md @@ -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) +pub fn gethostname<'a>(buffer: &'a mut [u8]) -> Result<&'a CStr>; ``` ## Requirements