chore(cargo): bump to Rust edition 2024 (#223)
Some checks are pending
Docker image build / build (push) Waiting to run
Rust / build (push) Waiting to run

* chore(cargo): bump to Rust edition 2024 and move shared dependency into
workspace `Cargo.toml`

* style(phantun): use Rust 2024 `&&` combination for `if let`
This commit is contained in:
Datong Sun
2025-08-23 00:20:07 +08:00
committed by GitHub
parent 2a37a2fc92
commit 66de44e32f
5 changed files with 15 additions and 14 deletions

View File

@@ -245,13 +245,12 @@ async fn main() -> io::Result<()> {
res = sock.recv(&mut buf_tcp) => {
match res {
Some(size) => {
if size > 0 {
if let Err(e) = udp_sock.send(&buf_tcp[..size]).await {
if size > 0
&& let Err(e) = udp_sock.send(&buf_tcp[..size]).await {
error!("Unable to send UDP packet to {}: {}, closing connection", e, addr);
quit.cancel();
return;
}
}
},
None => {
debug!("removed fake TCP socket from connections table");