Change suggested by cargo build.

This commit is contained in:
mattbk
2025-10-01 14:18:44 -05:00
parent c6ee82e338
commit 0420e9994b

View File

@@ -4,7 +4,7 @@ use std::net::UdpSocket;
fn main() -> std::io::Result<()> {
let socket_result: Result<UdpSocket, std::io::Error> = UdpSocket::bind("127.0.0.1:7878");
let mut socket: UdpSocket = match socket_result {
let socket: UdpSocket = match socket_result {
Ok(s) => s,
Err(e) => {
println!("Failed to bind socket: {}", e);
@@ -28,7 +28,6 @@ fn main() -> std::io::Result<()> {
String::from_utf8_lossy(&buffer[..bytes_received])
);
// Echo the data back to the client
socket.send_to(&buffer[..bytes_received], src_addr)?;
}