Implement day 24

This commit is contained in:
2022-01-02 21:38:21 +01:00
parent 8ea716cba8
commit 255edaca79
2 changed files with 164 additions and 7 deletions

View File

@@ -90,7 +90,14 @@ where
let mut buffer = Vec::new();
input.read_to_end(&mut buffer).unwrap();
let (_, output) = parser(&buffer).finish().unwrap();
output
match parser(&buffer).finish() {
Ok((_, output)) => output,
Err(err) => {
panic!(
"Failed to parse input with error {:?} at \"{}\"",
err.code,
String::from_utf8_lossy(err.input)
);
}
}
}