Minor refactoring/formatting fixes
This commit is contained in:
parent
cbefcdcad7
commit
f9bff6acab
3 changed files with 8 additions and 8 deletions
|
|
@ -21,13 +21,15 @@ async fn main() -> io::Result<()> {
|
|||
);
|
||||
|
||||
let level: u8 = std::env::var("RUST_BACKTRACE")
|
||||
.unwrap_or("0".to_string()).trim().parse().unwrap_or(0);
|
||||
.unwrap_or("0".to_string())
|
||||
.trim()
|
||||
.parse()
|
||||
.unwrap_or(0);
|
||||
|
||||
eprintln!(" P! [{:?}] {location}: {payload}", ONSET.elapsed());
|
||||
|
||||
let trace = backtrace::Backtrace::capture();
|
||||
if trace.status() == backtrace::BacktraceStatus::Captured && level > 1
|
||||
{
|
||||
if trace.status() == backtrace::BacktraceStatus::Captured && level > 1 {
|
||||
eprintln!("\n Stack trace:\n{trace:#?}");
|
||||
}
|
||||
}));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue