I want to read a line from a TCPStream, write another line to it, and then repeat. The issue is that BufReader::new takes ownership of my TCPStream variable:
let stream = ...; // TCPStream
let reader = BufReader::new(stream); // moved its value
// can't use stream here anymore
What is a simple solution to this?