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 committed by June 🍓🦴
parent 4521e93d04
commit 050841a871

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>() { let details = if let Some(s) = err.downcast_ref::<String>() {
s.clone() s.clone()
} else if let Some(s) = err.downcast_ref::<&str>() { } else if let Some(s) = err.downcast_ref::<&str>() {
s.to_string() (*s).to_owned()
} else { } else {
"Unknown internal server error occurred.".to_owned() "Unknown internal server error occurred.".to_owned()
}; };