Fix inefficient-to-string

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-06-02 00:29:45 +00:00
parent 387dfb28bb
commit aecfa72ced

View file

@ -160,7 +160,7 @@ fn catch_panic(err: Box<dyn Any + Send + 'static>) -> http::Response<http_body_u
let details = if let Some(s) = err.downcast_ref::<String>() {
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()
};