> but Rust's type system did catch this error - and then author decided it's fine to panic if this error happens
The issue is that it wasn't fine to panic, thus Rust did not catch this error.
The issue is that it wasn't fine to panic, thus Rust did not catch this error.