7 lines
195 B
Rust
7 lines
195 B
Rust
use anyhow::Result;
|
|
|
|
pub fn host_name() -> Result<String> {
|
|
Ok(hostname::get()?
|
|
.into_string()
|
|
.map_err(|_| anyhow::Error::msg("Failed converting OsString in host_name"))?)
|
|
}
|