From 050841a871a80670b8e52ab4b7f15cc0c4e68cb5 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Sun, 2 Jun 2024 00:29:45 +0000 Subject: [PATCH] Fix inefficient-to-string Signed-off-by: Jason Volk --- src/router/layers.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/router/layers.rs b/src/router/layers.rs index a6e30e98..33d0cb20 100644 --- a/src/router/layers.rs +++ b/src/router/layers.rs @@ -160,7 +160,7 @@ fn catch_panic(err: Box) -> http::Response() { s.clone() } else if let Some(s) = err.downcast_ref::<&str>() { - s.to_string() + (*s).to_owned() } else { "Unknown internal server error occurred.".to_owned() };