logoalt Hacker News

cipherjimyesterday at 11:24 PM0 repliesview on HN

My favourite never type ability is when you need to conform to a trait that returns Result but your specific implementation can never produce an error.

Return Result<T, !> and the compiler knows that callers never have to check the error case because by definition it can’t be constructed.