From e05e736244b29fd5f2bbe167a6d33c93974b48d9 Mon Sep 17 00:00:00 2001 From: YK Date: Fri, 10 May 2024 20:23:14 +0300 Subject: [PATCH] stage 1 attempt 1 --- src/main.rs | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/main.rs b/src/main.rs index 01f209e..8fef9d1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,5 +1,5 @@ // Uncomment this block to pass the first stage -// use std::net::TcpListener; +use std::net::TcpListener; fn main() { // You can use print statements as follows for debugging, they'll be visible when running tests. @@ -7,16 +7,16 @@ fn main() { // Uncomment this block to pass the first stage // - // let listener = TcpListener::bind("127.0.0.1:4221").unwrap(); - // - // for stream in listener.incoming() { - // match stream { - // Ok(_stream) => { - // println!("accepted new connection"); - // } - // Err(e) => { - // println!("error: {}", e); - // } - // } - // } + let listener = TcpListener::bind("127.0.0.1:4221").unwrap(); + + for stream in listener.incoming() { + match stream { + Ok(_stream) => { + println!("accepted new connection"); + } + Err(e) => { + println!("error: {}", e); + } + } + } }