Skip to content

Commit

Permalink
Suppress warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
MEhrn00 committed Feb 16, 2024
1 parent 3cac61a commit a2c92e6
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ use ffiwrappers::{
linux::addrinfo::{AddrInfoList, AiFlags, Hints, SockType},
};

#[allow(unused)]
pub fn hostname() -> Result<String, ThanatosError> {
let h = ffiwrappers::linux::gethostname().map_err(ThanatosError::FFIError)?;
Ok(h.split('.').next().unwrap_or(&h).to_string())
}

#[allow(unused)]
pub fn domain() -> Result<String, ThanatosError> {
let current_host = ffiwrappers::linux::gethostname().map_err(ThanatosError::FFIError)?;
let current_host =
Expand Down Expand Up @@ -43,6 +45,7 @@ pub fn domain() -> Result<String, ThanatosError> {
Ok(s.collect::<Vec<&str>>().join("."))
}

#[allow(unused)]
pub fn username() -> Result<String, ThanatosError> {
ffiwrappers::linux::username().map_err(ThanatosError::FFIError)
}
Expand Down

0 comments on commit a2c92e6

Please sign in to comment.