chore: enable lints in dns-over-tcp (#10762)

Appears to have been an oversight when we first introduced this crate.
This commit is contained in:
Thomas Eizinger
2025-10-30 17:39:51 +11:00
committed by GitHub
parent 498c0de006
commit 9cde3265e7
5 changed files with 13 additions and 2 deletions

View File

@@ -20,3 +20,6 @@ futures = { workspace = true }
ip_network = { workspace = true }
tokio = { workspace = true, features = ["process", "rt", "macros"] }
tun = { workspace = true }
[lints]
workspace = true

View File

@@ -135,7 +135,7 @@ impl<const MIN_PORT: u16, const MAX_PORT: u16> Client<MIN_PORT, MAX_PORT> {
match packet.destination() {
IpAddr::V4(v4) if v4 != ipv4_source => return false,
IpAddr::V6(v6) if v6 != ipv6_source => return false,
_ => {}
IpAddr::V4(_) | IpAddr::V6(_) => {}
}
let remote = SocketAddr::new(packet.source(), tcp.source_port());

View File

@@ -182,7 +182,10 @@ impl Server {
}
for (handle, l3_tcp::AnySocket::Tcp(socket)) in self.sockets.iter_mut() {
let local = self.listen_endpoints.get(&handle).copied().unwrap();
let Some(local) = self.listen_endpoints.get(&handle).copied() else {
tracing::warn!(%handle, "No listen endpoint for socket");
continue;
};
let _guard = tracing::trace_span!("socket", %handle).entered();

View File

@@ -1,3 +1,6 @@
#![allow(clippy::unwrap_used)]
#![allow(clippy::print_stdout)]
use std::{
collections::BTreeSet,
net::{Ipv4Addr, Ipv6Addr, SocketAddr, SocketAddrV4},

View File

@@ -1,3 +1,5 @@
#![allow(clippy::unwrap_used)]
use std::{
collections::BTreeSet,
net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr, SocketAddrV4},