From 818a5e8608d91b0310625dfbfa348a0fb026ea69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 20 Mar 2017 21:24:02 +0100 Subject: [PATCH] README.md: update gethostname api --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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