From d5cd57261e2088c01378450d4d1d35d90a886530 Mon Sep 17 00:00:00 2001 From: Martin Brodbeck Date: Wed, 4 Oct 2023 10:14:46 +0200 Subject: [PATCH] code beautifying --- src/main.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 4a26834..4ab29be 100644 --- a/src/main.rs +++ b/src/main.rs @@ -121,7 +121,9 @@ fn main() -> std::io::Result<()> { env_logger::init(); let socket = UdpSocket::bind("0.0.0.0:7373")?; - socket.set_read_timeout(Some(core::time::Duration::from_secs(KEEPALIVE))).expect("Could not set read timeout"); + socket + .set_read_timeout(Some(core::time::Duration::from_secs(KEEPALIVE))) + .expect("Could not set read timeout"); debug!("Morserino chat server started."); @@ -140,10 +142,9 @@ fn main() -> std::io::Result<()> { socket.send_to(b"", rec.0).unwrap(); } continue; - }, + } }; - let client_addr = src_addr.to_string(); let speed = buf[1] >> 2; let data = &buf[0..number_of_bytes];