as I understand it, this requires an Option or Result return type that matches the type of the statement
The ? operator is better than nothing, but I still need my error types to match all the way up the stack
The ? operator is better than nothing, but I still need my error types to match all the way up the stack
And if you think about it, defining those operator is a good practice as it tells your program how to handle errors.
Places where that approach really sucks include web api routes (unless I haven't figured out a trick yet). For example, rocket defines Responder on Result so long as the ok and error variants both define it, but since a boxed error is erased it doesn't function correctly.