Use debug_assert instead of assert in code where performance is important.

This commit is contained in:
Dan Gohman
2017-08-31 16:36:18 -07:00
parent 583487bfac
commit 1d03244e90
2 changed files with 5 additions and 5 deletions

View File

@@ -89,7 +89,7 @@ pub struct Memory {
pub struct Local(pub u32);
impl cretonne::entity::EntityRef for Local {
fn new(index: usize) -> Self {
assert!(index < (u32::MAX as usize));
debug_assert!(index < (u32::MAX as usize));
Local(index as u32)
}