Skip to content

Commit

Permalink
works on my end
Browse files Browse the repository at this point in the history
  • Loading branch information
ToyVo committed Dec 5, 2024
1 parent 9bc7fa7 commit 24c7b7b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/darwin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ fn get_hostname(hostname: Option<String>) -> Result<String> {
bail!("Failed to get hostname");
}
let name = unsafe { CFString::wrap_under_get_rule(ptr) };
Ok(name.to_string())
return Ok(name.to_string());
}
#[cfg(not(target_os = "macos"))]
{
Ok(hostname::get()
return Ok(hostname::get()
.context("Failed to get hostname")?
.to_str()
.unwrap()
.to_string())
.to_string());
};
}
}
Expand Down

0 comments on commit 24c7b7b

Please sign in to comment.