We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ae5acbc commit 6a7556aCopy full SHA for 6a7556a
1 file changed
src/main.rs
@@ -67,7 +67,14 @@ impl State {
67
let stdin = std::io::stdin();
68
let mut lines = Vec::new();
69
for line in stdin.lines() {
70
- lines.push(line.expect("Can read line from stdin"));
+ if let Ok(line_ok) = line {
71
+ lines.push(line_ok);
72
+ } else {
73
+ log::warn!(
74
+ "Line was not valid utf8!! {:?}",
75
+ line.expect_err("unreachable")
76
+ )
77
+ }
78
}
79
Box::new(Drun::new(lines))
80
}),
0 commit comments