diff options
| author | Henry <mail@henrygressmann.de> | 2026-04-22 22:14:12 +0200 |
|---|---|---|
| committer | Henry <mail@henrygressmann.de> | 2026-04-22 22:14:12 +0200 |
| commit | 5b318177aa4f79246e772c5fcef6ee4bac5bdaa0 (patch) | |
| tree | 82e33779942c744ad212c0c7038ac0e216cd7e94 /crates/parser/src/conversion.rs | |
| parent | 238e7aa76102cf64fa22ac5774326fcf35bc3792 (diff) | |
chore: reduce call & instantiation overhead
Signed-off-by: Henry <mail@henrygressmann.de>
Diffstat (limited to 'crates/parser/src/conversion.rs')
| -rw-r--r-- | crates/parser/src/conversion.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/parser/src/conversion.rs b/crates/parser/src/conversion.rs index 08f3c83..f7fcb34 100644 --- a/crates/parser/src/conversion.rs +++ b/crates/parser/src/conversion.rs @@ -241,8 +241,8 @@ pub(crate) fn process_const_operators(ops: OperatorsReader<'_>) -> Result<Box<[C // In practice, the len can never be something other than 2, // but we'll keep this here since it's part of the spec // Invalid modules will be rejected by the validator anyway (there are also tests for this in the testsuite) - assert!(ops.len() >= 2); - assert!(matches!(ops[ops.len() - 1], wasmparser::Operator::End)); + debug_assert!(ops.len() >= 2); + debug_assert!(matches!(ops[ops.len() - 1], wasmparser::Operator::End)); let mut out = Vec::with_capacity(ops.len().saturating_sub(1)); for op in ops.iter().take(ops.len() - 1) { |
