Fix inefficient-to-string
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
4521e93d04
commit
050841a871
1 changed files with 1 additions and 1 deletions
|
@ -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()
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue