by baby · 3y ago · 0 comments
Another way to think about this is that there’s three kind of errors:
- recoverable (return Err)
- unrecoverable (debug assert)
- unrecoverable and tricky (assert)
If the assert tests something expensive, I will usually switch to a debug assert.