JSAbrahams / mamba

🐍 The Mamba programming language, because we care about safety
MIT License
85 stars 3 forks source link

Use unreachable macro instead of unwrap #124

Closed JSAbrahams closed 5 years ago

JSAbrahams commented 5 years ago

Current issue

We use unwrap in multiple locations in the code which is discouraged in production code.

description of feature

Add extra assertion checks for debug, and use unimplemented! macro combined with 'unwrap_or_else'.

In situations where we are absolutely sure we may use unreachable_checked.

JSAbrahams commented 5 years ago

Alternatively we can use expect