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::{
1818#[ cfg( feature = "tracing" ) ]
1919use tracing:: instrument;
2020
21+ fn check_bootstrap_profile_flag ( ) -> bool {
22+ env:: var ( "BOOTSTRAP_PROFILE" ) . is_ok_and ( |v| v == "1" )
23+ }
24+
2125#[ cfg_attr( feature = "tracing" , instrument( level = "trace" , name = "main" ) ) ]
2226fn main ( ) {
2327 #[ cfg( feature = "tracing" ) ]
@@ -152,7 +156,7 @@ fn main() {
152156 }
153157 }
154158
155- if env :: var ( "BOOTSTRAP_PROFILE" ) . is_ok_and ( |v| v == "1" ) {
159+ if check_bootstrap_profile_flag ( ) {
156160 build. report_summary ( start_time) ;
157161 }
158162}
@@ -234,7 +238,7 @@ fn setup_tracing() -> impl Drop {
234238 let mut chrome_layer = tracing_chrome:: ChromeLayerBuilder :: new ( ) . include_args ( true ) ;
235239
236240 // 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 ( ) {
238242 chrome_layer = chrome_layer. writer ( io:: sink ( ) ) ;
239243 }
240244
You can’t perform that action at this time.
0 commit comments