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:#}");
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use std::{
|
||||
fmt::Debug,
|
||||
sync::{atomic::Ordering, Arc},
|
||||
sync::{Arc, atomic::Ordering},
|
||||
time::Duration,
|
||||
};
|
||||
|
||||
|
@ -8,7 +8,7 @@ use axum::{
|
|||
extract::State,
|
||||
response::{IntoResponse, Response},
|
||||
};
|
||||
use conduwuit::{debug, debug_error, debug_warn, err, error, trace, Result};
|
||||
use conduwuit::{Result, debug, debug_error, debug_warn, err, error, trace};
|
||||
use conduwuit_service::Services;
|
||||
use futures::FutureExt;
|
||||
use http::{Method, StatusCode, Uri};
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use std::sync::Arc;
|
||||
|
||||
use axum::{response::IntoResponse, routing::get, Router};
|
||||
use axum::{Router, response::IntoResponse, routing::get};
|
||||
use conduwuit::Error;
|
||||
use conduwuit_api::router::{state, state::Guard};
|
||||
use conduwuit_service::Services;
|
||||
|
|
|
@ -3,12 +3,12 @@ extern crate conduwuit_core as conduwuit;
|
|||
extern crate conduwuit_service as service;
|
||||
|
||||
use std::{
|
||||
sync::{atomic::Ordering, Arc, Weak},
|
||||
sync::{Arc, Weak, atomic::Ordering},
|
||||
time::Duration,
|
||||
};
|
||||
|
||||
use axum_server::Handle as ServerHandle;
|
||||
use conduwuit::{debug, debug_error, debug_info, error, info, Error, Result, Server};
|
||||
use conduwuit::{Error, Result, Server, debug, debug_error, debug_info, error, info};
|
||||
use futures::FutureExt;
|
||||
use service::Services;
|
||||
use tokio::{
|
||||
|
|
|
@ -6,7 +6,7 @@ mod unix;
|
|||
use std::sync::Arc;
|
||||
|
||||
use axum_server::Handle as ServerHandle;
|
||||
use conduwuit::{err, Result};
|
||||
use conduwuit::{Result, err};
|
||||
use conduwuit_service::Services;
|
||||
use tokio::sync::broadcast;
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
use std::{
|
||||
net::SocketAddr,
|
||||
sync::{atomic::Ordering, Arc},
|
||||
sync::{Arc, atomic::Ordering},
|
||||
};
|
||||
|
||||
use axum::Router;
|
||||
use axum_server::{bind, Handle as ServerHandle};
|
||||
use conduwuit::{debug_info, info, Result, Server};
|
||||
use axum_server::{Handle as ServerHandle, bind};
|
||||
use conduwuit::{Result, Server, debug_info, info};
|
||||
use tokio::task::JoinSet;
|
||||
|
||||
pub(super) async fn serve(
|
||||
|
|
|
@ -3,10 +3,10 @@ use std::{net::SocketAddr, sync::Arc};
|
|||
use axum::Router;
|
||||
use axum_server::Handle as ServerHandle;
|
||||
use axum_server_dual_protocol::{
|
||||
axum_server::{bind_rustls, tls_rustls::RustlsConfig},
|
||||
ServerExt,
|
||||
axum_server::{bind_rustls, tls_rustls::RustlsConfig},
|
||||
};
|
||||
use conduwuit::{err, Result, Server};
|
||||
use conduwuit::{Result, Server, err};
|
||||
use tokio::task::JoinSet;
|
||||
use tracing::{debug, info, warn};
|
||||
|
||||
|
|
|
@ -4,15 +4,15 @@ use std::{
|
|||
net::{self, IpAddr, Ipv4Addr},
|
||||
os::fd::AsRawFd,
|
||||
path::Path,
|
||||
sync::{atomic::Ordering, Arc},
|
||||
sync::{Arc, atomic::Ordering},
|
||||
};
|
||||
|
||||
use axum::{
|
||||
extract::{connect_info::IntoMakeServiceWithConnectInfo, Request},
|
||||
Router,
|
||||
extract::{Request, connect_info::IntoMakeServiceWithConnectInfo},
|
||||
};
|
||||
use conduwuit::{
|
||||
debug, debug_error, info, result::UnwrapInfallible, trace, warn, Err, Result, Server,
|
||||
Err, Result, Server, debug, debug_error, info, result::UnwrapInfallible, trace, warn,
|
||||
};
|
||||
use hyper::{body::Incoming, service::service_fn};
|
||||
use hyper_util::{
|
||||
|
@ -21,10 +21,10 @@ use hyper_util::{
|
|||
};
|
||||
use tokio::{
|
||||
fs,
|
||||
net::{unix::SocketAddr, UnixListener, UnixStream},
|
||||
net::{UnixListener, UnixStream, unix::SocketAddr},
|
||||
sync::broadcast::{self},
|
||||
task::JoinSet,
|
||||
time::{sleep, Duration},
|
||||
time::{Duration, sleep},
|
||||
};
|
||||
use tower::{Service, ServiceExt};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue