From 45e82305457428a7da20911c0e51b4e2f0096908 Mon Sep 17 00:00:00 2001 From: Artemy Date: Thu, 11 Aug 2022 17:59:55 +0300 Subject: [PATCH] perf: rewrite the return fragment --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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, } ); }));