diff --git a/src/cargo/core/shell.rs b/src/cargo/core/shell.rs index 8350f99e87b..eae8a70cc8d 100644 --- a/src/cargo/core/shell.rs +++ b/src/cargo/core/shell.rs @@ -379,7 +379,7 @@ impl ColorChoice { } } -#[cfg(any(target_os = "linux", target_os = "macos", target_os = "freebsd"))] +#[cfg(unix)] mod imp { use super::Shell; use std::mem; @@ -408,18 +408,6 @@ mod imp { } } -#[cfg(all( - unix, - not(any(target_os = "linux", target_os = "macos", target_os = "freebsd")) -))] -mod imp { - pub(super) use super::default_err_erase_line as err_erase_line; - - pub fn stderr_width() -> Option { - None - } -} - #[cfg(windows)] mod imp { use std::{cmp, mem, ptr}; @@ -476,13 +464,7 @@ mod imp { } } -#[cfg(any( - all( - unix, - not(any(target_os = "linux", target_os = "macos", target_os = "freebsd")) - ), - windows, -))] +#[cfg(windows)] fn default_err_erase_line(shell: &mut Shell) { if let Some(max_width) = imp::stderr_width() { let blank = " ".repeat(max_width);