mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 11:52:19 +00:00
Use debug_assert! insetead of expect
This commit is contained in:
parent
5d6c47b25f
commit
5370a27370
1 changed files with 1 additions and 5 deletions
|
@ -118,12 +118,8 @@ impl MonoTypes {
|
|||
|
||||
let opt = self.entries.get(id.inner.index());
|
||||
|
||||
#[cfg(debug_assertions)]
|
||||
{
|
||||
opt.expect("A MonoTypeId corresponded to an index that wasn't in MonoTypes. This should never happen!")
|
||||
}
|
||||
debug_assert!(opt.is_some(), "A MonoTypeId corresponded to an index that wasn't in MonoTypes. This should never happen!");
|
||||
|
||||
#[cfg(not(debug_assertions))]
|
||||
unsafe {
|
||||
opt.unwrap_unchecked()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue