mirror of
https://github.com/theoludwig/programming-challenges.git
synced 2025-05-18 12:02:53 +02:00
fix: avoid usage of .unwrap
in Rust solutions
This commit is contained in:
@ -3,6 +3,6 @@ use std::io::{self, BufRead};
|
||||
fn main() {
|
||||
let stdin = io::stdin();
|
||||
for line in stdin.lock().lines() {
|
||||
println!("Hello, {}!", line.unwrap());
|
||||
println!("Hello, {}!", line.expect("Failed to read `stdin` line."));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user