File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,10 @@ use bootstrap::{
18
18
#[ cfg( feature = "tracing" ) ]
19
19
use tracing:: instrument;
20
20
21
+ fn check_bootstrap_profile_flag ( ) -> bool {
22
+ env:: var ( "BOOTSTRAP_PROFILE" ) . is_ok_and ( |v| v == "1" )
23
+ }
24
+
21
25
#[ cfg_attr( feature = "tracing" , instrument( level = "trace" , name = "main" ) ) ]
22
26
fn main ( ) {
23
27
#[ cfg( feature = "tracing" ) ]
@@ -152,7 +156,7 @@ fn main() {
152
156
}
153
157
}
154
158
155
- if env :: var ( "BOOTSTRAP_PROFILE" ) . is_ok_and ( |v| v == "1" ) {
159
+ if check_bootstrap_profile_flag ( ) {
156
160
build. report_summary ( start_time) ;
157
161
}
158
162
}
@@ -234,7 +238,7 @@ fn setup_tracing() -> impl Drop {
234
238
let mut chrome_layer = tracing_chrome:: ChromeLayerBuilder :: new ( ) . include_args ( true ) ;
235
239
236
240
// Writes the Chrome profile to trace-<unix-timestamp>.json if enabled
237
- if !env :: var ( "BOOTSTRAP_PROFILE" ) . is_ok_and ( |v| v == "1" ) {
241
+ if !check_bootstrap_profile_flag ( ) {
238
242
chrome_layer = chrome_layer. writer ( io:: sink ( ) ) ;
239
243
}
240
244
You can’t perform that action at this time.
0 commit comments