engine/Networking/src/hostname.rs
2024-08-23 13:22:09 +02:00

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"))?)
}