mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-01 17:00:21 +08:00
fix(proxy): 修复 Clippy dead_code 与 too_many_arguments 警告
This commit is contained in:
@@ -233,6 +233,7 @@ pub async fn run(mut config: Config, servers: Vec<ServerEntry>) -> anyhow::Resul
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(clippy::too_many_arguments)]
|
||||||
async fn spawn_registration_recovery_tasks(
|
async fn spawn_registration_recovery_tasks(
|
||||||
state: Arc<AppState>,
|
state: Arc<AppState>,
|
||||||
server_contexts: Arc<Mutex<Vec<Arc<ServerContext>>>>,
|
server_contexts: Arc<Mutex<Vec<Arc<ServerContext>>>>,
|
||||||
@@ -272,6 +273,7 @@ async fn spawn_registration_recovery_tasks(
|
|||||||
|
|
||||||
/// Background task that retries registration for a single server until either
|
/// Background task that retries registration for a single server until either
|
||||||
/// registration succeeds or shutdown is requested.
|
/// registration succeeds or shutdown is requested.
|
||||||
|
#[allow(clippy::too_many_arguments)]
|
||||||
async fn retry_failed_registration(
|
async fn retry_failed_registration(
|
||||||
state: Arc<AppState>,
|
state: Arc<AppState>,
|
||||||
server_contexts: Arc<Mutex<Vec<Arc<ServerContext>>>>,
|
server_contexts: Arc<Mutex<Vec<Arc<ServerContext>>>>,
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ const DELEGATE_TO_UPSTREAM: &[(&str, &str)] = &[
|
|||||||
/// 307/308 redirects. Kept aligned with the current admin-side request size
|
/// 307/308 redirects. Kept aligned with the current admin-side request size
|
||||||
/// default, but exposed as an independent proxy transport budget.
|
/// default, but exposed as an independent proxy transport budget.
|
||||||
pub const DEFAULT_HEARTBEAT_INTERVAL_SECS: u64 = 30;
|
pub const DEFAULT_HEARTBEAT_INTERVAL_SECS: u64 = 30;
|
||||||
|
#[allow(dead_code)]
|
||||||
pub const DEFAULT_REDIRECT_REPLAY_BUDGET_BYTES: usize = 5_242_880;
|
pub const DEFAULT_REDIRECT_REPLAY_BUDGET_BYTES: usize = 5_242_880;
|
||||||
pub const DEFAULT_REDIRECT_REPLAY_BUDGET_HUMAN: &str = "5M";
|
pub const DEFAULT_REDIRECT_REPLAY_BUDGET_HUMAN: &str = "5M";
|
||||||
pub const DEFAULT_LOG_RETENTION_DAYS: u64 = 7;
|
pub const DEFAULT_LOG_RETENTION_DAYS: u64 = 7;
|
||||||
|
|||||||
@@ -362,6 +362,7 @@ fn resolve_redirect<B>(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(clippy::too_many_arguments)]
|
||||||
async fn execute_upstream_request(
|
async fn execute_upstream_request(
|
||||||
state: &AppState,
|
state: &AppState,
|
||||||
server: &ServerContext,
|
server: &ServerContext,
|
||||||
@@ -455,6 +456,7 @@ async fn execute_upstream_request(
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(clippy::too_many_arguments)]
|
||||||
async fn relay_upstream_response(
|
async fn relay_upstream_response(
|
||||||
server: &ServerContext,
|
server: &ServerContext,
|
||||||
stream_id: u32,
|
stream_id: u32,
|
||||||
@@ -577,6 +579,7 @@ async fn relay_upstream_response(
|
|||||||
Some(total_elapsed)
|
Some(total_elapsed)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
fn upstream_client_for_request<'a>(
|
fn upstream_client_for_request<'a>(
|
||||||
state: &'a AppState,
|
state: &'a AppState,
|
||||||
meta: &RequestMeta,
|
meta: &RequestMeta,
|
||||||
|
|||||||
Reference in New Issue
Block a user