File tree 1 file changed +5
-6
lines changed 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -213,14 +213,13 @@ fn panic_hook(info: &PanicHookInfo<'_>) {
213
213
fn panic_hook ( info : & PanicHookInfo < ' _ > ) {
214
214
use human_panic:: { handle_dump, print_msg, Metadata } ;
215
215
216
- let meta = Metadata {
217
- version : env ! ( "CARGO_PKG_VERSION" ) . into ( ) ,
218
- name : env ! ( "CARGO_PKG_NAME" ) . into ( ) ,
219
- authors : env ! ( "CARGO_PKG_AUTHORS" ) . replace ( ":" , ", " ) . into ( ) ,
220
- homepage : env ! ( "CARGO_PKG_HOMEPAGE" ) . into ( ) ,
221
- } ;
216
+ let meta = Metadata :: new ( env ! ( "CARGO_PKG_NAME" ) , env ! ( "CARGO_PKG_VERSION" ) )
217
+ . authors ( env ! ( "CARGO_PKG_AUTHORS" ) . replace ( ':' , ", " ) )
218
+ . homepage ( env ! ( "CARGO_PKG_HOMEPAGE" ) ) ;
219
+
222
220
let file_path = handle_dump ( & meta, info) ;
223
221
disable_raw_mode ( ) . unwrap ( ) ;
224
222
execute ! ( io:: stdout( ) , LeaveAlternateScreen , DisableMouseCapture ) . unwrap ( ) ;
225
223
print_msg ( file_path, & meta) . expect ( "human-panic: printing error message to console failed" ) ;
226
224
}
225
+
You can’t perform that action at this time.
0 commit comments