doc(env): should_print_debug_info

This commit is contained in:
steven-omaha
2024-04-07 18:10:01 +02:00
parent 8850cab4a3
commit 2b03e579da
+2
View File
@@ -14,6 +14,8 @@ fn get_single_var(variable: &str) -> Option<String> {
var(variable).ok() 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 { pub fn should_print_debug_info() -> bool {
match get_single_var("RUST_BACKTRACE") { match get_single_var("RUST_BACKTRACE") {
Some(value) if ["s", "full"].contains(&value.as_str()) => true, Some(value) if ["s", "full"].contains(&value.as_str()) => true,