remove unessesery line
This commit is contained in:
parent
8ff5112352
commit
bdecb76824
@ -101,14 +101,12 @@ async fn start_client(addr: &str) -> Result<(), Box<dyn Error>> {
|
||||
stream.write_all(username.trim().as_bytes()).await?;
|
||||
|
||||
println!("Connected to server at {}", addr);
|
||||
let mut input = String::new();
|
||||
loop {
|
||||
let mut input = String::new();
|
||||
reader.read_line(&mut input).await?;
|
||||
stream.write_all(input.trim().as_bytes()).await?;
|
||||
|
||||
// Print sent message
|
||||
println!("Sent message from {}: {}", username.trim(), input.trim());
|
||||
input.clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user