@@ -2609,7 +2609,6 @@ pub enum Destination {
2609
2609
}
2610
2610
2611
2611
pub enum WritableDst < ' a > {
2612
- Terminal ( & ' a mut StandardStream ) ,
2613
2612
Buffered ( & ' a mut BufferWriter , Buffer ) ,
2614
2613
Raw ( & ' a mut ( dyn WriteColor + Send ) ) ,
2615
2614
}
@@ -2632,7 +2631,7 @@ impl Destination {
2632
2631
2633
2632
fn writable ( & mut self ) -> WritableDst < ' _ > {
2634
2633
match * self {
2635
- Destination :: Terminal ( ref mut t) => WritableDst :: Terminal ( t) ,
2634
+ Destination :: Terminal ( ref mut t) => WritableDst :: Raw ( t) ,
2636
2635
Destination :: Buffered ( ref mut t) => {
2637
2636
let buf = t. buffer ( ) ;
2638
2637
WritableDst :: Buffered ( t, buf)
@@ -2703,15 +2702,13 @@ impl<'a> WritableDst<'a> {
2703
2702
2704
2703
fn set_color ( & mut self , color : & ColorSpec ) -> io:: Result < ( ) > {
2705
2704
match * self {
2706
- WritableDst :: Terminal ( ref mut t) => t. set_color ( color) ,
2707
2705
WritableDst :: Buffered ( _, ref mut t) => t. set_color ( color) ,
2708
2706
WritableDst :: Raw ( ref mut t) => t. set_color ( color) ,
2709
2707
}
2710
2708
}
2711
2709
2712
2710
fn reset ( & mut self ) -> io:: Result < ( ) > {
2713
2711
match * self {
2714
- WritableDst :: Terminal ( ref mut t) => t. reset ( ) ,
2715
2712
WritableDst :: Buffered ( _, ref mut t) => t. reset ( ) ,
2716
2713
WritableDst :: Raw ( ref mut t) => t. reset ( ) ,
2717
2714
}
@@ -2721,15 +2718,13 @@ impl<'a> WritableDst<'a> {
2721
2718
impl < ' a > Write for WritableDst < ' a > {
2722
2719
fn write ( & mut self , bytes : & [ u8 ] ) -> io:: Result < usize > {
2723
2720
match * self {
2724
- WritableDst :: Terminal ( ref mut t) => t. write ( bytes) ,
2725
2721
WritableDst :: Buffered ( _, ref mut buf) => buf. write ( bytes) ,
2726
2722
WritableDst :: Raw ( ref mut w) => w. write ( bytes) ,
2727
2723
}
2728
2724
}
2729
2725
2730
2726
fn flush ( & mut self ) -> io:: Result < ( ) > {
2731
2727
match * self {
2732
- WritableDst :: Terminal ( ref mut t) => t. flush ( ) ,
2733
2728
WritableDst :: Buffered ( _, ref mut buf) => buf. flush ( ) ,
2734
2729
WritableDst :: Raw ( ref mut w) => w. flush ( ) ,
2735
2730
}
0 commit comments