https://crates.io/crates/always-assert
A version of assert macros inspired by The Use Of assert() In SQLite
if never!(impossible_condition) {
// The impossible happened 💔
// This would have panicked in debug.
// in release we get a chance for best-effort recovery.
return None;
}
This is useful for long-running applications, which can't just printf("Sucks to be you"); exit(666)
if things go south. I am somewhat embarrassed that that it took me so long to realize this pattern exists: seems obvious in retrospect!