From 2153087b877452a70d611e3ff48a63dc368ea088 Mon Sep 17 00:00:00 2001 From: Maxim Vezenov Date: Fri, 23 Aug 2024 15:37:00 +0000 Subject: [PATCH] use if let not match --- .../src/ssa/acir_gen/acir_ir/acir_variable.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/compiler/noirc_evaluator/src/ssa/acir_gen/acir_ir/acir_variable.rs b/compiler/noirc_evaluator/src/ssa/acir_gen/acir_ir/acir_variable.rs index 7c5393f3704..8733456a75b 100644 --- a/compiler/noirc_evaluator/src/ssa/acir_gen/acir_ir/acir_variable.rs +++ b/compiler/noirc_evaluator/src/ssa/acir_gen/acir_ir/acir_variable.rs @@ -1933,11 +1933,8 @@ impl AcirContext { } Some(optional_value) => { let mut values = Vec::new(); - match optional_value { - AcirValue::DynamicArray(_) => { - unreachable!("Dynamic array should already be initialized"); - } - _ => {} + if let AcirValue::DynamicArray(_) = optional_value { + unreachable!("Dynamic array should already be initialized"); } self.initialize_array_inner(&mut values, optional_value)?; values