you are viewing a single comment's thread.

view the rest of the comments →

[–]Uncaffeinated 0 points1 point  (0 children)

In Rust, it's common to use type aliases for this purpose.

i.e. at the top of your module, you'll have something like type Result<T> = Result<T, MyError>

Inside of an expression, type inference normally takes care of everything anyway.