From dbf2c13bdbfbe2957eb8a6e2716d9feab6e0ea6d Mon Sep 17 00:00:00 2001 From: Tom French <15848336+TomAFrench@users.noreply.github.com> Date: Thu, 26 Sep 2024 21:35:25 +0100 Subject: [PATCH] chore: remove unused import (#8835) Please read [contributing guidelines](CONTRIBUTING.md) and remove this line. --- .../src/state_vars/shared_mutable/shared_mutable.nr | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/noir-projects/aztec-nr/aztec/src/state_vars/shared_mutable/shared_mutable.nr b/noir-projects/aztec-nr/aztec/src/state_vars/shared_mutable/shared_mutable.nr index c79ae7cad7f..2b6f380e961 100644 --- a/noir-projects/aztec-nr/aztec/src/state_vars/shared_mutable/shared_mutable.nr +++ b/noir-projects/aztec-nr/aztec/src/state_vars/shared_mutable/shared_mutable.nr @@ -1,7 +1,4 @@ -use dep::protocol_types::{ - hash::{pedersen_hash, poseidon2_hash}, header::Header, address::AztecAddress, - traits::{FromField, ToField} -}; +use dep::protocol_types::{hash::{pedersen_hash, poseidon2_hash}, address::AztecAddress, traits::{FromField, ToField}}; use crate::context::{PrivateContext, PublicContext, UnconstrainedContext}; use crate::state_vars::{ @@ -32,10 +29,8 @@ global HASH_SEPARATOR: u32 = 2; // can actually use it here impl Storage for SharedMutable {} -// TODO: extract into a utils module once we can do arithmetic on generics, i.e. https://github.com/noir-lang/noir/issues/4784 -fn concat_arrays(arr_n: [Field; N], arr_m: [Field; M]) -> [Field; O] { - assert_eq(N + M, O); - let mut out: [Field; O] = [0; O]; +fn concat_arrays(arr_n: [Field; N], arr_m: [Field; M]) -> [Field; N + M] { + let mut out: [Field; N + M] = [0; N + M]; for i in 0..N { out[i] = arr_n[i]; } @@ -222,8 +217,6 @@ impl SharedMutable, delay_change: ScheduledDelayChange ) -> Field { - // TODO(#5491 and https://github.com/noir-lang/noir/issues/4784): update this so that we don't need to rely on - // ScheduledValueChange serializing to 3 and ScheduledDelayChange serializing to 1 let concatenated: [Field; 4] = concat_arrays(value_change.serialize(), delay_change.serialize()); poseidon2_hash(concatenated) }