格式化代码

This commit is contained in:
lubeilin
2023-01-09 20:30:35 +08:00
parent c655d9650b
commit 6bfadfe5b8
3 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -249,7 +249,7 @@ async fn res_symmetric_handle_loop(
}
match tokio::time::timeout(Duration::from_secs(30), receiver.recv()).await {
Ok(_) => {}
Err(e) => {}
Err(_e) => {}
}
loop {
tokio::select! {
+2 -2
View File
@@ -32,7 +32,7 @@ pub async fn udp_recv_start<F>(
udp: UdpSocket,
server_addr: SocketAddr,
other_sender: Sender<(SocketAddr, Vec<u8>)>,
mut tun_writer: TunWriter,
tun_writer: TunWriter,
current_device: CurrentDeviceInfo,
stop_fn: F,
) where
@@ -275,7 +275,7 @@ fn other_handle(
}
Protocol::Control => {
match ControlPacket::new(net_packet.transport_protocol(), net_packet.payload())? {
ControlPacket::PingPacket(ping) => {
ControlPacket::PingPacket(_ping) => {
net_packet.set_transport_protocol(control_packet::Protocol::Pong.into());
udp.send_to(&net_packet.buffer()[..12], peer_addr)?;
}