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 {
3030
3131impl Process {
3232 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+ } )
3437 }
3538
3639 pub fn name ( & self ) -> Option < String > {
@@ -215,21 +218,6 @@ pub struct OsProcess {
215218 pub ( self ) stdout_is_a_tty : bool ,
216219}
217220
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-
233221// ------------ test process ----------------
234222#[ cfg( feature = "test" ) ]
235223#[ derive( Clone , Debug , Default ) ]
You can’t perform that action at this time.
0 commit comments