Result sometimes occurs parameterized with an error type that has no possible values, such as
std::convert::Infallible. Consequently, calling the
unwrap method on a
Result value of such a type will never panic.
Therein lies a maintainability hazard: if the error parameter type is later changed to one that can represent actually occurring errors, those uses of
unwrap that could previously be relied upon to be infallible, quietly become liable to panic.
To help prevent this from happening without a compile-time safeguard, crate unwrap-infallible provides an alternative method
unwrap_infallible that shall only be available for
Result values with a known-impossible