perf: simplify method signatures and reduce clone across multiple files (#1663)

This commit is contained in:
Tunglies
2025-12-09 16:47:57 +08:00
committed by GitHub
parent 2bc51daa98
commit fe4dff5df0
33 changed files with 62 additions and 81 deletions
+3 -3
View File
@@ -85,7 +85,7 @@ impl UdpNatEntry {
async fn compose_ipv4_packet(
self: &Arc<Self>,
packet_sender: &mut Sender<ZCPacket>,
packet_sender: &Sender<ZCPacket>,
buf: &mut [u8],
src_v4: &SocketAddrV4,
payload_len: usize,
@@ -139,7 +139,7 @@ impl UdpNatEntry {
async fn forward_task(
self: Arc<Self>,
mut packet_sender: Sender<ZCPacket>,
packet_sender: Sender<ZCPacket>,
virtual_ipv4: Ipv4Addr,
real_ipv4: Ipv4Addr,
mapped_ipv4: Ipv4Addr,
@@ -207,7 +207,7 @@ impl UdpNatEntry {
let Ok(_) = Self::compose_ipv4_packet(
&self_clone,
&mut packet_sender,
&packet_sender,
&mut packet,
&src_v4,
len,