perf: rewrite the return fragment

This commit is contained in:
Artemy 2022-08-11 17:59:55 +03:00
parent b9dbc1c82e
commit 45e8230545

View file

@ -19,8 +19,8 @@ fn main() {
eprint!( eprint!(
"{msg}", "{msg}",
msg = match info.payload().downcast_ref::<String>() { msg = match info.payload().downcast_ref::<String>() {
None => "Program panicked without a message!".to_owned(), None => "Program panicked without a message!",
Some(x) => x.to_string(), Some(x) => &x,
} }
); );
})); }));