diff --git a/src/steps/os/mod.rs b/src/steps/os/mod.rs index 4df39e21..54c78056 100644 --- a/src/steps/os/mod.rs +++ b/src/steps/os/mod.rs @@ -14,7 +14,7 @@ pub mod macos; pub mod openbsd; #[cfg(unix)] pub mod unix; -#[cfg(target_os = "windows")] +#[cfg(windows)] pub mod windows; #[cfg(windows)] diff --git a/src/utils.rs b/src/utils.rs index 0b52f192..59f5f46a 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -151,7 +151,7 @@ pub fn string_prepend_str(string: &mut String, s: &str) { *string = new_string; } -#[cfg(target_family = "unix")] +#[cfg(unix)] pub fn hostname() -> Result { match nix::unistd::gethostname() { Ok(os_str) => Ok(os_str @@ -161,7 +161,7 @@ pub fn hostname() -> Result { } } -#[cfg(target_family = "windows")] +#[cfg(windows)] pub fn hostname() -> Result { Command::new("hostname") .output_checked_utf8()