Remove unused prints

This commit is contained in:
Sofia 2026-07-16 02:16:49 +03:00
parent f3429ff4e8
commit 4c24d1ce46
2 changed files with 3 additions and 10 deletions

View File

@ -234,7 +234,7 @@ impl ConnectionManager {
let now = Instant::now();
self.connections.retain(|addr, conn| {
self.connections.retain(|_, conn| {
let retain = match conn.state {
ConnectionState::ReceivingClosing => {
if (now - conn.last_recv_close) > Duration::from_millis(500) {
@ -253,8 +253,6 @@ impl ConnectionManager {
retain
});
for (addr, conn) in &self.connections {}
messages
}
}
@ -287,14 +285,10 @@ impl UdpWrapper {
if buf.len() > DATAGRAM_SIZE {
return Err(SendError::DatagramTooLarge(buf.len()));
}
let res = socket
socket
.send_to(&buf, addr)
.map_err(|e| SendError::SendError(e))
.map(|_| ());
if let Ok(_) = res {
println!("Sent: {:?}", package);
}
res
.map(|_| ())
} else {
Err(SendError::SocketDisconnected)
}

View File

@ -28,7 +28,6 @@ impl Listener {
let mut ciborium_buf: Datagram = [0; _];
let bytes = Cursor::new(&mut buffer[..num_bytes]);
let res = ciborium::from_reader_with_buffer::<Package, _>(bytes, &mut ciborium_buf);
println!("Received: {:?}", res);
match res {
Ok(pkg) => self.sender.send(ListenerMessage::Package(pkg, from_addr)),
Err(_) => self.sender.send(ListenerMessage::PackageError(