Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Bad example, that should panic (in a perfect world it should be a compile error). The invariant of the type is that `E::Rest` cannot hold zero.


Why is that a bad example? It's proof that implementing From does not solve the problem.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: