Patterns for Defensive Programming in Rust
Link: https://corrode.dev/blog/defensive-programming/
Discussion: https://news.ycombinator.com/item?id=46163609

Patterns for Defensive Programming in Rust | corrode Rust Consulting
I have a hobby. Whenever I see the comment // this should never happen in code, I try to find out the exact conditions under which it could happen. And in 90% of cases, I find a way to do just that. More often than not…