heim-host 0.0.4

Cross-platform host information
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use std::ffi::CStr;
use std::borrow::Cow;

mod platform;
mod users;

pub use self::platform::*;
pub use self::users::*;

// moo!
#[inline(always)]
pub(crate) unsafe fn into_cow(chars: &[libc::c_char]) -> Cow<str> {
    CStr::from_ptr(chars.as_ptr()).to_string_lossy()
}