diff --git a/src/cargo/core/shell.rs b/src/cargo/core/shell.rs index d4df8a661d7..768c86f7a91 100644 --- a/src/cargo/core/shell.rs +++ b/src/cargo/core/shell.rs @@ -340,13 +340,6 @@ impl Shell { } } - /// Write a styled fragment - /// - /// Caller is responsible for deciding whether [`Shell::verbosity`] is affects output. - pub fn write_stdout(&mut self, fragment: impl fmt::Display, color: &Style) -> CargoResult<()> { - self.output.write_stdout(fragment, color) - } - /// Prints a message to stderr and translates ANSI escape code into console colors. pub fn print_ansi_stderr(&mut self, message: &[u8]) -> CargoResult<()> { if self.needs_clear { @@ -409,17 +402,6 @@ impl ShellOut { Ok(()) } - /// Write a styled fragment - fn write_stdout(&mut self, fragment: impl fmt::Display, style: &Style) -> CargoResult<()> { - let style = style.render(); - let reset = anstyle::Reset.render(); - - let mut buffer = Vec::new(); - write!(buffer, "{style}{}{reset}", fragment)?; - self.stdout().write_all(&buffer)?; - Ok(()) - } - /// Gets stdout as a `io::Write`. fn stdout(&mut self) -> &mut dyn Write { match *self {