@@ -60,14 +60,6 @@ pub trait Writer: Write + Send + Sync {
60
60
fn terminal ( & self ) -> ColorableTerminal ;
61
61
}
62
62
63
- // -------------- stdout -------------------------------
64
-
65
- /// Stand-in for [`std::io::stdout`].
66
- #[ enum_dispatch]
67
- pub trait StdoutSource {
68
- fn stdout ( & self ) -> Box < dyn Writer > ;
69
- }
70
-
71
63
// -------------- stderr -------------------------------
72
64
73
65
/// Stand-in for std::io::stderr.
@@ -98,12 +90,6 @@ impl Writer for io::Stdout {
98
90
}
99
91
}
100
92
101
- impl StdoutSource for super :: OSProcess {
102
- fn stdout ( & self ) -> Box < dyn Writer > {
103
- Box :: new ( io:: stdout ( ) )
104
- }
105
- }
106
-
107
93
impl WriterLock for io:: StderrLock < ' _ > { }
108
94
109
95
impl Writer for io:: Stderr {
@@ -208,7 +194,7 @@ mod test_support {
208
194
209
195
/// A thread-safe test file handle that pretends to be e.g. stdout.
210
196
#[ derive( Clone , Default ) ]
211
- pub ( in super :: super ) struct TestWriter ( TestWriterInner ) ;
197
+ pub ( in super :: super ) struct TestWriter ( pub ( in super :: super ) TestWriterInner ) ;
212
198
213
199
impl TestWriter {
214
200
pub ( in super :: super ) fn lock ( & self ) -> TestWriterLock < ' _ > {
@@ -244,12 +230,6 @@ mod test_support {
244
230
}
245
231
}
246
232
247
- impl StdoutSource for TestProcess {
248
- fn stdout ( & self ) -> Box < dyn Writer > {
249
- Box :: new ( TestWriter ( self . stdout . clone ( ) ) )
250
- }
251
- }
252
-
253
233
impl StderrSource for TestProcess {
254
234
fn stderr ( & self ) -> Box < dyn Writer > {
255
235
Box :: new ( TestWriter ( self . stderr . clone ( ) ) )
0 commit comments