Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

.unwrap() in production code is perfectly normal where the author believes other code constraints outside the scope of the type system prevent it ever having a non-truthy value. Technically the author should have used `.expect(...)` instead with a message but even if the author were to write a `match` instead, the author would have panicked in the _ case. (Think erroneous design assumptions or logical errors.)


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: