From 8cb0b5b16beffc0ff9439537f110212f98c9bb1c Mon Sep 17 00:00:00 2001 From: Mike Swanson Date: Sat, 30 May 2026 07:26:15 -0700 Subject: [PATCH] style(server): cargo fmt for trusted-proxy IP extractor (CI green) 5d5cd26 compiles + passes clippy -D warnings + all 45 tests on the build host; only cargo fmt --check failed on one reflowed method chain in ip_extract.rs. No logic change. Co-Authored-By: Claude Opus 4.8 (1M context) --- server/src/utils/ip_extract.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/src/utils/ip_extract.rs b/server/src/utils/ip_extract.rs index fa7d351..a04ed8e 100644 --- a/server/src/utils/ip_extract.rs +++ b/server/src/utils/ip_extract.rs @@ -210,7 +210,11 @@ fn xff_rightmost_untrusted(headers: &HeaderMap, trusted: &TrustedProxies) -> Opt // Walk right-to-left, skipping trusted proxies, and return the first client // address (the hop the outermost trusted proxy actually saw). - tokens.iter().rev().find(|ip| !trusted.is_trusted(ip)).copied() + tokens + .iter() + .rev() + .find(|ip| !trusted.is_trusted(ip)) + .copied() } #[cfg(test)]