advent-of-code-rust
advent-of-code-rust copied to clipboard
Have parts use Result instead of Option
Would it be better to return a Result instead of an Option for the parts? Given the nature of the puzzles, we should be generating either a value or an error. Plus, I'd like to replace all of my unwraps with "?"s.
I'd like to replace all of my unwraps with "?"s
You can append .ok() to results to cast them to an option, then your ? will work.