1
1
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:
2023-08-21 22:45:05 +02:00
parent 5b3048f305
commit 2386ea012d
8 changed files with 38 additions and 15 deletions

View File

@ -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."));
}
}