run cargo fix for rust 2024 changes and rustfmt
Signed-off-by: June Clementine Strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
e97952b7f6
commit
a1e1f40ded
320 changed files with 2212 additions and 2039 deletions
|
@ -1,16 +1,16 @@
|
|||
use std::{any::Any, sync::Arc, time::Duration};
|
||||
|
||||
use axum::{
|
||||
extract::{DefaultBodyLimit, MatchedPath},
|
||||
Router,
|
||||
extract::{DefaultBodyLimit, MatchedPath},
|
||||
};
|
||||
use axum_client_ip::SecureClientIpSource;
|
||||
use conduwuit::{debug, error, Result, Server};
|
||||
use conduwuit::{Result, Server, debug, error};
|
||||
use conduwuit_api::router::state::Guard;
|
||||
use conduwuit_service::Services;
|
||||
use http::{
|
||||
header::{self, HeaderName},
|
||||
HeaderValue, Method, StatusCode,
|
||||
header::{self, HeaderName},
|
||||
};
|
||||
use tower::ServiceBuilder;
|
||||
use tower_http::{
|
||||
|
@ -176,12 +176,12 @@ fn catch_panic(
|
|||
.requests_panic
|
||||
.fetch_add(1, std::sync::atomic::Ordering::Release);
|
||||
|
||||
let details = if let Some(s) = err.downcast_ref::<String>() {
|
||||
s.clone()
|
||||
} else if let Some(s) = err.downcast_ref::<&str>() {
|
||||
(*s).to_owned()
|
||||
} else {
|
||||
"Unknown internal server error occurred.".to_owned()
|
||||
let details = match err.downcast_ref::<String>() {
|
||||
| Some(s) => s.clone(),
|
||||
| _ => match err.downcast_ref::<&str>() {
|
||||
| Some(s) => (*s).to_owned(),
|
||||
| _ => "Unknown internal server error occurred.".to_owned(),
|
||||
},
|
||||
};
|
||||
|
||||
error!("{details:#}");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue