We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aead757 commit c8267bcCopy full SHA for c8267bc
README.md
@@ -26,8 +26,8 @@ call:
26
// libc api (unsafe, requires handling return code/errno)
27
pub unsafe extern fn gethostname(name: *mut c_char, len: size_t) -> c_int;
28
29
-// nix api (returns a nix::Result)
30
-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>;
31
```
32
33
## Supported Platforms
0 commit comments