File tree 1 file changed +16
-17
lines changed
1 file changed +16
-17
lines changed Original file line number Diff line number Diff line change @@ -295,23 +295,22 @@ pub fn get_backtrace_style() -> Option<BacktraceStyle> {
295
295
return Some ( style) ;
296
296
}
297
297
298
- // Setting environment variables for Fuchsia components isn't a standard
299
- // or easily supported workflow. For now, display backtraces by default.
300
- let format = if cfg ! ( target_os = "fuchsia" ) {
301
- BacktraceStyle :: Full
302
- } else {
303
- crate :: env:: var_os ( "RUST_BACKTRACE" )
304
- . map ( |x| {
305
- if & x == "0" {
306
- BacktraceStyle :: Off
307
- } else if & x == "full" {
308
- BacktraceStyle :: Full
309
- } else {
310
- BacktraceStyle :: Short
311
- }
312
- } )
313
- . unwrap_or ( BacktraceStyle :: Off )
314
- } ;
298
+ let format = crate :: env:: var_os ( "RUST_BACKTRACE" )
299
+ . map ( |x| {
300
+ if & x == "0" {
301
+ BacktraceStyle :: Off
302
+ } else if & x == "full" {
303
+ BacktraceStyle :: Full
304
+ } else {
305
+ BacktraceStyle :: Short
306
+ }
307
+ } )
308
+ . unwrap_or ( if cfg ! ( target_os = "fuchsia" ) {
309
+ // Fuchsia components default to full backtrace.
310
+ BacktraceStyle :: Full
311
+ } else {
312
+ BacktraceStyle :: Off
313
+ } ) ;
315
314
set_backtrace_style ( format) ;
316
315
Some ( format)
317
316
}
You can’t perform that action at this time.
0 commit comments