diff --git a/src/main.rs b/src/main.rs index 2bbb186..d96a52c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -19,8 +19,8 @@ fn main() { eprint!( "{msg}", msg = match info.payload().downcast_ref::() { - None => "Program panicked without a message!".to_owned(), - Some(x) => x.to_string(), + None => "Program panicked without a message!", + Some(x) => &x, } ); }));