@@ -8,7 +8,6 @@ pub const STANDARD_RANGE: ProgressRange = 2..=2;
8
8
9
9
/// If verbose is true, the env logger will be forcibly set to 'info' logging level. Otherwise env logging facilities
10
10
/// will just be initialized.
11
- #[ cfg( feature = "env_logger" ) ]
12
11
#[ allow( unused) ] // Squelch warning because it's used in porcelain as well and we can't know that at compile time
13
12
pub fn init_env_logger ( ) {
14
13
if cfg ! ( feature = "small" ) {
@@ -59,13 +58,7 @@ pub mod pretty {
59
58
progress : bool ,
60
59
#[ cfg_attr( not( feature = "prodash-render-tui" ) , allow( unused_variables) ) ] progress_keep_open : bool ,
61
60
#[ cfg_attr( not( feature = "prodash-render-line" ) , allow( unused_variables) ) ] range : impl Into < Option < ProgressRange > > ,
62
- #[ cfg( not( any( feature = "prodash-render-line" , feature = "prodash-render-tui" ) ) ) ] run : impl FnOnce (
63
- progress:: DoOrDiscard < prodash:: progress:: Log > ,
64
- & mut dyn std:: io:: Write ,
65
- & mut dyn std:: io:: Write ,
66
- )
67
- -> Result < T > ,
68
- #[ cfg( any( feature = "prodash-render-line" , feature = "prodash-render-tui" ) ) ] run : impl FnOnce (
61
+ run : impl FnOnce (
69
62
progress:: DoOrDiscard < prodash:: tree:: Item > ,
70
63
& mut dyn std:: io:: Write ,
71
64
& mut dyn std:: io:: Write ,
@@ -87,27 +80,15 @@ pub mod pretty {
87
80
( true , false ) => {
88
81
let progress = crate :: shared:: progress_tree ( ) ;
89
82
let sub_progress = progress. add_child ( name) ;
90
- #[ cfg( not( feature = "prodash-render-line" ) ) ]
91
- {
92
- let stdout = stdout ( ) ;
93
- let mut stdout_lock = stdout. lock ( ) ;
94
- run (
95
- progress:: DoOrDiscard :: from ( Some ( sub_progress) ) ,
96
- & mut stdout_lock,
97
- & mut stderr ( ) ,
98
- )
99
- }
100
- #[ cfg( feature = "prodash-render-line" ) ]
101
- {
102
- use crate :: shared:: { self , STANDARD_RANGE } ;
103
- let handle = shared:: setup_line_renderer_range ( & progress, range. into ( ) . unwrap_or ( STANDARD_RANGE ) ) ;
104
83
105
- let mut out = Vec :: < u8 > :: new ( ) ;
106
- let res = run ( progress:: DoOrDiscard :: from ( Some ( sub_progress) ) , & mut out, & mut stderr ( ) ) ;
107
- handle. shutdown_and_wait ( ) ;
108
- std:: io:: Write :: write_all ( & mut stdout ( ) , & out) ?;
109
- res
110
- }
84
+ use crate :: shared:: { self , STANDARD_RANGE } ;
85
+ let handle = shared:: setup_line_renderer_range ( & progress, range. into ( ) . unwrap_or ( STANDARD_RANGE ) ) ;
86
+
87
+ let mut out = Vec :: < u8 > :: new ( ) ;
88
+ let res = run ( progress:: DoOrDiscard :: from ( Some ( sub_progress) ) , & mut out, & mut stderr ( ) ) ;
89
+ handle. shutdown_and_wait ( ) ;
90
+ std:: io:: Write :: write_all ( & mut stdout ( ) , & out) ?;
91
+ res
111
92
}
112
93
#[ cfg( not( feature = "prodash-render-tui" ) ) ]
113
94
( true , true ) | ( false , true ) => {
0 commit comments