diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2023-07-26 18:26:24 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2023-07-31 09:34:36 +0000 |
| commit | 10da30f540f76c10c7f029da1eec27439496f703 (patch) | |
| tree | cdef0bd22ea695b1ee4730577ef1cd3b05d6079b /compiler/rustc_errors/src | |
| parent | 826a8ef52ed7809953e5a702d5ea88de2f1fd065 (diff) | |
| download | rust-10da30f540f76c10c7f029da1eec27439496f703.tar.gz rust-10da30f540f76c10c7f029da1eec27439496f703.zip | |
Merge all `Destination` variants
Diffstat (limited to 'compiler/rustc_errors/src')
| -rw-r--r-- | compiler/rustc_errors/src/emitter.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/compiler/rustc_errors/src/emitter.rs b/compiler/rustc_errors/src/emitter.rs index cf456ebc8d5..b51ec3a8fcd 100644 --- a/compiler/rustc_errors/src/emitter.rs +++ b/compiler/rustc_errors/src/emitter.rs @@ -2604,7 +2604,6 @@ fn emit_to_destination( } pub enum Destination { - Terminal(StandardStream), Raw(Box<(dyn WriteColor + Send)>), } @@ -2649,7 +2648,7 @@ impl Destination { // On non-Windows we rely on the atomicity of `write` to ensure errors // don't get all jumbled up. if cfg!(windows) { - Terminal(StandardStream::stderr(choice)) + Raw(Box::new(StandardStream::stderr(choice))) } else { let buffer_writer = BufferWriter::stderr(choice); let buffer = buffer_writer.buffer(); @@ -2659,14 +2658,12 @@ impl Destination { fn writable(&mut self) -> &mut dyn WriteColor { match *self { - Destination::Terminal(ref mut t) => t, Destination::Raw(ref mut t) => t, } } fn supports_color(&self) -> bool { match *self { - Self::Terminal(ref stream) => stream.supports_color(), Self::Raw(ref writer) => writer.supports_color(), } } |
