Hi, I have a partial function like:
fn foo<T1, T2>(x: T1, y: T2) -> Option<T2> where...
I've seen that I could make it total restricting the input like this:
fn foo<T1, T2>(x: T1, y: NonZero<T2>) -> T2 where...
Turning/writing functions into total ones is an excellent thing to do, in general. Good modern languages need to do all they can to help this!
But the stdlib has
NonZeroXXX instead of
NonZero<> (for reasons I don't know). Do you have ideas?