chore(lint): extend low-risk clippy cleanup batch
- normalize numeric literals (115_200) in hardware/peripheral config paths - remove test-only useless format! allocations in discord IDs - simplify closures and auto-deref in browser/http/rag/peripherals - keep behavior unchanged while reducing warning surface
This commit is contained in:
@@ -2023,7 +2023,7 @@ fn is_non_global_v6(v6: std::net::Ipv6Addr) -> bool {
|
||||
// Link-local (fe80::/10)
|
||||
|| (segs[0] & 0xffc0) == 0xfe80
|
||||
// IPv4-mapped addresses
|
||||
|| v6.to_ipv4_mapped().is_some_and(|v4| is_non_global_v4(v4))
|
||||
|| v6.to_ipv4_mapped().is_some_and(is_non_global_v4)
|
||||
}
|
||||
|
||||
fn host_matches_allowlist(host: &str, allowed: &[String]) -> bool {
|
||||
|
||||
@@ -428,7 +428,7 @@ fn is_non_global_v6(v6: std::net::Ipv6Addr) -> bool {
|
||||
|| (segs[0] & 0xfe00) == 0xfc00 // Unique-local (fc00::/7)
|
||||
|| (segs[0] & 0xffc0) == 0xfe80 // Link-local (fe80::/10)
|
||||
|| (segs[0] == 0x2001 && segs[1] == 0x0db8) // Documentation (2001:db8::/32)
|
||||
|| v6.to_ipv4_mapped().is_some_and(|v4| is_non_global_v4(v4))
|
||||
|| v6.to_ipv4_mapped().is_some_and(is_non_global_v4)
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
Reference in New Issue
Block a user