Fix clippy warnings: remove unused imports/variables/functions, derive Default, fix comparisons
This commit is contained in:
@ -3,12 +3,11 @@
|
||||
//! Provides mutual TLS authentication middleware for Actix-web.
|
||||
//! Non-mTLS connections are silently dropped (no response).
|
||||
|
||||
use actix_web::http::header;
|
||||
use actix_web::{
|
||||
dev::{forward_ready, Service, ServiceRequest, ServiceResponse, Transform},
|
||||
Error, HttpMessage,
|
||||
};
|
||||
use chrono::{DateTime, Duration, Utc};
|
||||
use chrono::{DateTime, Utc};
|
||||
use futures_util::future::LocalBoxFuture;
|
||||
use rustls::{
|
||||
server::{ServerConfig, WebPkiClientVerifier},
|
||||
@ -19,9 +18,8 @@ use std::{
|
||||
fs::File,
|
||||
io::BufReader,
|
||||
sync::Arc,
|
||||
task::{Context, Poll},
|
||||
};
|
||||
use tracing::{debug, info, warn};
|
||||
use tracing::{info, warn};
|
||||
|
||||
/// Check for duplicate critical headers (VULN-006)
|
||||
/// Returns true if duplicate headers are detected
|
||||
@ -275,7 +273,7 @@ where
|
||||
|
||||
// All checks passed - call the service
|
||||
let fut = self.service.call(req);
|
||||
Box::pin(async move { fut.await })
|
||||
Box::pin(fut)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ use std::net::{IpAddr, Ipv4Addr, SocketAddr};
|
||||
use std::path::Path;
|
||||
use std::sync::{Arc, RwLock};
|
||||
use std::time::Duration;
|
||||
use tracing::{debug, error, info, warn};
|
||||
use tracing::{debug, info, warn};
|
||||
|
||||
/// Whitelist entry types
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
|
||||
@ -193,7 +193,7 @@ impl WhitelistManager {
|
||||
/// Set up file watcher for auto-reload
|
||||
fn setup_watcher(&mut self) -> Result<()> {
|
||||
let config_path = self.config_path.clone();
|
||||
let entries = self.entries.clone();
|
||||
let _entries = self.entries.clone();
|
||||
|
||||
let watcher = RecommendedWatcher::new(
|
||||
move |res: Result<Event, notify::Error>| {
|
||||
|
||||
Reference in New Issue
Block a user