From 24c7b7b2da24432d023bbf0c386f148e92a20ea9 Mon Sep 17 00:00:00 2001 From: Collin Diekvoss Date: Thu, 5 Dec 2024 00:44:14 -0600 Subject: [PATCH] works on my end --- src/darwin.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/darwin.rs b/src/darwin.rs index 4b77413..c1a1853 100644 --- a/src/darwin.rs +++ b/src/darwin.rs @@ -43,15 +43,15 @@ fn get_hostname(hostname: Option) -> Result { 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()); }; } }