File tree Expand file tree Collapse file tree 1 file changed +4
-16
lines changed Expand file tree Collapse file tree 1 file changed +4
-16
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,10 @@ pub enum Process {
30
30
31
31
impl Process {
32
32
pub fn os ( ) -> Self {
33
- Self :: Os ( OsProcess :: new ( ) )
33
+ Self :: Os ( OsProcess {
34
+ stderr_is_a_tty : io:: stderr ( ) . is_terminal ( ) ,
35
+ stdout_is_a_tty : io:: stdout ( ) . is_terminal ( ) ,
36
+ } )
34
37
}
35
38
36
39
pub fn name ( & self ) -> Option < String > {
@@ -215,21 +218,6 @@ pub struct OsProcess {
215
218
pub ( self ) stdout_is_a_tty : bool ,
216
219
}
217
220
218
- impl OsProcess {
219
- pub fn new ( ) -> Self {
220
- Self {
221
- stderr_is_a_tty : io:: stderr ( ) . is_terminal ( ) ,
222
- stdout_is_a_tty : io:: stdout ( ) . is_terminal ( ) ,
223
- }
224
- }
225
- }
226
-
227
- impl Default for OsProcess {
228
- fn default ( ) -> Self {
229
- Self :: new ( )
230
- }
231
- }
232
-
233
221
// ------------ test process ----------------
234
222
#[ cfg( feature = "test" ) ]
235
223
#[ derive( Clone , Debug , Default ) ]
You can’t perform that action at this time.
0 commit comments