remove unnecessary Box
This commit is contained in:
parent
022f01e532
commit
931b976a34
@ -162,7 +162,8 @@ async fn main() -> anyhow::Result<()> {
|
||||
Err(err) => {
|
||||
let err = err
|
||||
.downcast::<String>()
|
||||
.unwrap_or_else(|_| Box::new("?".to_owned()));
|
||||
.map(|err| *err)
|
||||
.unwrap_or_else(|_| "?".to_owned());
|
||||
|
||||
Some(format!("panic at: {err}"))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user