Is this hard to understand?
Is using consecutive matches and blocks confusing?
use std::io;
use std::io::BufRead;
fn main() {
let stdin = io::stdin();
let lines_iter = stdin.lock().lines();
for line in lines_iter {
// is this confusing?
match match line {
Ok(line) => Command::parse(&line),
Err(e) => {
println!("Error, unable to read line: {}", e);
Command::Quit
}
} {
Command::Quit => break,
command => call(command),
};
}
}