@@ -10,14 +10,17 @@ fn main() { | |||
loop { | |||
let mut buffer = String::new(); | |||
match std::io::stdin().read_line(&mut buffer){ | |||
Ok(_n) => { | |||
match std::io::stdin().read_line(&mut buffer) { | |||
Ok(n) => { | |||
if n == 0 { | |||
break; | |||
} | |||
println!("{}", buffer); | |||
} | |||
Err(_error) =>{ | |||
Err(_error) => { | |||
println!("Fehlerhafte Eingabe!"); | |||
break; | |||
} | |||
} | |||
} | |||
} // the stream is closed here | |||
} // the stream is closed here |