diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2023-07-26 14:43:39 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2023-07-31 09:34:36 +0000 |
| commit | 339890e18618ff6efbe999e079a242c083dd7060 (patch) | |
| tree | 4628083d7bb224ded3762f08e922e638ab7dd8b4 /compiler/rustc_errors/src | |
| parent | 51c22154f56d54d512b0b14aebf9eb18278963a1 (diff) | |
| download | rust-339890e18618ff6efbe999e079a242c083dd7060.tar.gz rust-339890e18618ff6efbe999e079a242c083dd7060.zip | |
Remove an enum variant that can be covered by another
Diffstat (limited to 'compiler/rustc_errors/src')
| -rw-r--r-- | compiler/rustc_errors/src/emitter.rs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/compiler/rustc_errors/src/emitter.rs b/compiler/rustc_errors/src/emitter.rs index 87b3a25ed44..a54bc1b3c49 100644 --- a/compiler/rustc_errors/src/emitter.rs +++ b/compiler/rustc_errors/src/emitter.rs @@ -2609,7 +2609,6 @@ pub enum Destination { } pub enum WritableDst<'a> { - Terminal(&'a mut StandardStream), Buffered(&'a mut BufferWriter, Buffer), Raw(&'a mut (dyn WriteColor + Send)), } @@ -2632,7 +2631,7 @@ impl Destination { fn writable(&mut self) -> WritableDst<'_> { match *self { - Destination::Terminal(ref mut t) => WritableDst::Terminal(t), + Destination::Terminal(ref mut t) => WritableDst::Raw(t), Destination::Buffered(ref mut t) => { let buf = t.buffer(); WritableDst::Buffered(t, buf) @@ -2703,7 +2702,6 @@ impl<'a> WritableDst<'a> { fn set_color(&mut self, color: &ColorSpec) -> io::Result<()> { match *self { - WritableDst::Terminal(ref mut t) => t.set_color(color), WritableDst::Buffered(_, ref mut t) => t.set_color(color), WritableDst::Raw(ref mut t) => t.set_color(color), } @@ -2711,7 +2709,6 @@ impl<'a> WritableDst<'a> { fn reset(&mut self) -> io::Result<()> { match *self { - WritableDst::Terminal(ref mut t) => t.reset(), WritableDst::Buffered(_, ref mut t) => t.reset(), WritableDst::Raw(ref mut t) => t.reset(), } @@ -2721,7 +2718,6 @@ impl<'a> WritableDst<'a> { impl<'a> Write for WritableDst<'a> { fn write(&mut self, bytes: &[u8]) -> io::Result<usize> { match *self { - WritableDst::Terminal(ref mut t) => t.write(bytes), WritableDst::Buffered(_, ref mut buf) => buf.write(bytes), WritableDst::Raw(ref mut w) => w.write(bytes), } @@ -2729,7 +2725,6 @@ impl<'a> Write for WritableDst<'a> { fn flush(&mut self) -> io::Result<()> { match *self { - WritableDst::Terminal(ref mut t) => t.flush(), WritableDst::Buffered(_, ref mut buf) => buf.flush(), WritableDst::Raw(ref mut w) => w.flush(), } |
