chore: Clippy fixes

This commit is contained in:
Ginger
2026-08-25 12:37:13 -04:00
parent 18b0a87b2d
commit eadcea8034
14 changed files with 66 additions and 52 deletions
+1 -2
View File
@@ -68,8 +68,7 @@ pub(crate) async fn update_device_route(
services
.users
.update_device_metadata(sender_user, &body.device_id, &device)
.await?;
.update_device_metadata(sender_user, &body.device_id, &device)?;
Ok(update_device::v3::Response::new())
},
+6 -3
View File
@@ -104,12 +104,15 @@ impl<S> FromRequestParts<S> for ClientIp
{
type Rejection = ClientIpError;
async fn from_request_parts(parts: &mut Parts, state: &S) -> Result<Self, Self::Rejection> {
Self::for_config(
fn from_request_parts(
parts: &mut Parts,
state: &S,
) -> impl Future<Output = Result<Self, Self::Rejection>> {
std::future::ready(Self::for_config(
parts,
&state.config.accepted_ip_sources,
state.config.request_ip_source.as_ref(),
)
))
}
}
+3 -3
View File
@@ -331,14 +331,14 @@ async fn verify<B: AsRef<[u8]> + Sync>(
impl CheckAuth for NoAuthentication {
type Identity = ();
async fn verify<B: AsRef<[u8]> + Sync>(
fn verify<B: AsRef<[u8]> + Sync>(
_services: &Services,
_output: Self::Output,
_request: &hyper::Request<B>,
_query: AuthQueryParams,
_route: TypeId,
) -> Result<Self::Identity> {
Ok(())
) -> impl Future<Output = Result<Self::Identity>> {
std::future::ready(Ok(()))
}
}