diff --git a/src/main.rs b/src/main.rs index e65e6be..1692a30 100644 --- a/src/main.rs +++ b/src/main.rs @@ -304,12 +304,10 @@ fn panic_hook(info: &PanicInfo<'_>) { use human_panic::{handle_dump, print_msg, Metadata}; use log::error; - let meta = Metadata { - version: env!("CARGO_PKG_VERSION").into(), - name: env!("CARGO_PKG_NAME").into(), - authors: env!("CARGO_PKG_AUTHORS").replace(':', ", ").into(), - homepage: env!("CARGO_PKG_HOMEPAGE").into(), - }; + let meta = Metadata::new(env!("CARGO_PKG_NAME"), env!("CARGO_PKG_VERSION")) + .authors(env!("CARGO_PKG_AUTHORS").replace(':', ", ")) + .homepage(env!("CARGO_PKG_HOMEPAGE")); + let file_path = handle_dump(&meta, info); let (msg, location) = get_panic_info(info); let stacktrace: String = format!("{:?}", Backtrace::new()).replace('\n', "\n\r");