style(server): cargo fmt for trusted-proxy IP extractor (CI green)
All checks were successful
Build and Test / Build Agent (Windows) (push) Successful in 6m53s
Build and Test / Build Server (Linux) (push) Successful in 10m54s
Build and Test / Security Audit (push) Successful in 4m21s
Build and Test / Build Summary (push) Successful in 11s

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) <noreply@anthropic.com>
This commit is contained in:
2026-05-30 07:26:15 -07:00
parent 5d5cd26572
commit 8cb0b5b16b

View File

@@ -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)]