Is this idiomatic? .ok_or() followed by ?

60 points JonathanMathBoi

I'm still learning Rust by rewriting one of my past college assignments in Rust, and I've found a pattern in my code so far. When I'm writing a fallible function (returning Result<T, E>), I find I'll often call some method that returns an Option (often from an Iterator) which I then call .ok_or(my_custom_err) on, only to then use ? on it to get the good value back or return the error.

Is this good style/idiomatic, or should I be doing something else?