Added a missing blank line at the EOF of main.rs

This commit is contained in:
Namularbre (Thomas Sazerat)
2023-11-14 22:47:44 +01:00
parent ec7165b37d
commit 5fa298e9eb
2 changed files with 2 additions and 50 deletions

View File

@@ -1,5 +1,5 @@
use std::net::UdpSocket;
use std::io::stdin;
use std::net::UdpSocket;
fn main() {
let server_address: String = get_server_address();
@@ -21,6 +21,7 @@ fn listen(server_address: &str) {
let socket: UdpSocket = UdpSocket::bind(server_address).expect("Error while binding the socket.");
let (num_bytes, src_addr) = socket.recv_from(&mut buf).expect("Error while receiving message");
message.push_str(std::str::from_utf8(&buf[..num_bytes]).expect("Invalid UTF-8 data"));
println!("{}:{}", src_addr.to_string(), message);
if message.trim() == "!STOP" {