Inline and remove HumanEmitter::stderr.

Because `HumanEmitter::new` is enough, in conjunction with the (renamed)
`stderr_destination` function.
This commit is contained in:
Nicholas Nethercote 2024-02-29 15:37:38 +11:00
parent 437325bdd4
commit 067d7c3d00
8 changed files with 28 additions and 19 deletions

View file

@ -646,10 +646,6 @@ pub(crate) struct FileWithAnnotatedLines {
}
impl HumanEmitter {
pub fn stderr(color_config: ColorConfig, fallback_bundle: LazyFallbackBundle) -> HumanEmitter {
Self::new(from_stderr(color_config), fallback_bundle)
}
pub fn new(dst: Destination, fallback_bundle: LazyFallbackBundle) -> HumanEmitter {
HumanEmitter {
dst: IntoDynSyncSend(dst),
@ -2650,7 +2646,7 @@ impl WriteColor for Buffy {
}
}
fn from_stderr(color: ColorConfig) -> Destination {
pub fn stderr_destination(color: ColorConfig) -> Destination {
let choice = color.to_color_choice();
// On Windows we'll be performing global synchronization on the entire
// system for emitting rustc errors, so there's no need to buffer