Skip to content

Commit

Permalink
Update compiler/noirc_frontend/src/hir_def/types.rs
Browse files Browse the repository at this point in the history
Co-authored-by: jfecher <[email protected]>
  • Loading branch information
michaeljklein and jfecher authored Oct 9, 2024
1 parent 472e9cd commit aacd45a
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions compiler/noirc_frontend/src/hir_def/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2511,13 +2511,7 @@ impl BinaryTypeOperator {
BinaryTypeOperator::Addition => Some(a + b),
BinaryTypeOperator::Subtraction => Some(a - b),
BinaryTypeOperator::Multiplication => Some(a * b),
BinaryTypeOperator::Division => {
if b == FieldElement::zero() {
None
} else {
Some(a / b)
}
}
BinaryTypeOperator::Division => (b != FieldElement::zero()).then(|| a / b),
BinaryTypeOperator::Modulo => None,
},
Some(maximum_size) => {
Expand Down

0 comments on commit aacd45a

Please sign in to comment.