Format all code following migration to Rust edition 2024
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-03-28 10:23:37 +01:00
parent 44188975ca
commit e9e3103938
20 changed files with 41 additions and 32 deletions

View File

@ -1,4 +1,4 @@
use std::future::{ready, Ready};
use std::future::{Ready, ready};
use std::rc::Rc;
use crate::app_config::AppConfig;
@ -8,8 +8,8 @@ use crate::extractors::auth_extractor::AuthExtractor;
use actix_web::body::EitherBody;
use actix_web::dev::Payload;
use actix_web::{
dev::{forward_ready, Service, ServiceRequest, ServiceResponse, Transform},
Error, FromRequest, HttpResponse,
dev::{Service, ServiceRequest, ServiceResponse, Transform, forward_ready},
};
use futures_util::future::LocalBoxFuture;
@ -68,7 +68,10 @@ where
.unwrap();
if !AppConfig::get().is_allowed_ip(remote_ip.0) {
log::error!("An attempt to access VirtWeb from an unauthorized network has been intercepted! {:?}", remote_ip);
log::error!(
"An attempt to access VirtWeb from an unauthorized network has been intercepted! {:?}",
remote_ip
);
return Ok(req
.into_response(
HttpResponse::MethodNotAllowed()
@ -86,8 +89,8 @@ where
Ok(auth) => auth,
Err(e) => {
log::error!(
"Failed to extract API authentication information from request! {e}"
);
"Failed to extract API authentication information from request! {e}"
);
return Ok(req
.into_response(HttpResponse::PreconditionFailed().finish())
.map_into_right_body());