From fa3566a9cbc7309331dab17ae56d887d684ab2ad Mon Sep 17 00:00:00 2001 From: Dmitry Zarva Date: Fri, 17 Apr 2026 16:20:16 +0000 Subject: [PATCH] - fix: fmt issues --- src/transport/middle_proxy/config_updater.rs | 2 +- src/transport/middle_proxy/secret.rs | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/transport/middle_proxy/config_updater.rs b/src/transport/middle_proxy/config_updater.rs index 116bd77..b777445 100644 --- a/src/transport/middle_proxy/config_updater.rs +++ b/src/transport/middle_proxy/config_updater.rs @@ -440,7 +440,7 @@ async fn run_update_cycle( match download_proxy_secret_with_max_len_via_upstream( cfg.general.proxy_secret_len_max, upstream, - cfg.general.proxy_secret_url.as_deref() + cfg.general.proxy_secret_url.as_deref(), ) .await { diff --git a/src/transport/middle_proxy/secret.rs b/src/transport/middle_proxy/secret.rs index ba1b161..e3495e8 100644 --- a/src/transport/middle_proxy/secret.rs +++ b/src/transport/middle_proxy/secret.rs @@ -37,7 +37,11 @@ pub(super) fn validate_proxy_secret_len(data_len: usize, max_len: usize) -> Resu /// Fetch Telegram proxy-secret binary. #[allow(dead_code)] -pub async fn fetch_proxy_secret(cache_path: Option<&str>, max_len: usize, proxy_secret_url: Option<&str>) -> Result> { +pub async fn fetch_proxy_secret( + cache_path: Option<&str>, + max_len: usize, + proxy_secret_url: Option<&str>, +) -> Result> { fetch_proxy_secret_with_upstream(cache_path, max_len, proxy_secret_url, None).await } @@ -51,7 +55,8 @@ pub async fn fetch_proxy_secret_with_upstream( let cache = cache_path.unwrap_or("proxy-secret"); // 1) Try fresh download first. - match download_proxy_secret_with_max_len_via_upstream(max_len, upstream, proxy_secret_url).await { + match download_proxy_secret_with_max_len_via_upstream(max_len, upstream, proxy_secret_url).await + { Ok(data) => { if let Err(e) = tokio::fs::write(cache, &data).await { warn!(error = %e, "Failed to cache proxy-secret (non-fatal)");