From 2b03e579dacf87355fd9d3830435afb8447f4370 Mon Sep 17 00:00:00 2001 From: steven-omaha <35634100+steven-omaha@users.noreply.github.com> Date: Sun, 7 Apr 2024 18:10:01 +0200 Subject: [PATCH] doc(env): should_print_debug_info --- crates/pacdef_core/src/env.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/pacdef_core/src/env.rs b/crates/pacdef_core/src/env.rs index 6991e37..fe6dd6a 100644 --- a/crates/pacdef_core/src/env.rs +++ b/crates/pacdef_core/src/env.rs @@ -14,6 +14,8 @@ fn get_single_var(variable: &str) -> Option { var(variable).ok() } +/// Determine if debug information should be printed. Will return `true` if RUST_BACKTRACE equals +/// "s" or "full". pub fn should_print_debug_info() -> bool { match get_single_var("RUST_BACKTRACE") { Some(value) if ["s", "full"].contains(&value.as_str()) => true,