Skip to content

Commit

Permalink
chore: remove unused import (#8835)
Browse files Browse the repository at this point in the history
Please read [contributing guidelines](CONTRIBUTING.md) and remove this
line.
  • Loading branch information
TomAFrench authored Sep 26, 2024
1 parent d9baebe commit dbf2c13
Showing 1 changed file with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -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::{
Expand Down Expand Up @@ -32,10 +29,8 @@ global HASH_SEPARATOR: u32 = 2;
// can actually use it here
impl<T, let INITIAL_DELAY: u32, Context> Storage<T> for SharedMutable<T, INITIAL_DELAY, Context> {}

// 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<let N: u32, let M: u32, let O: u32>(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<let N: u32, let M: u32>(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];
}
Expand Down Expand Up @@ -222,8 +217,6 @@ impl<T, let INITIAL_DELAY: u32> SharedMutable<T, INITIAL_DELAY, &mut PrivateCont
value_change: ScheduledValueChange<T>,
delay_change: ScheduledDelayChange<INITIAL_DELAY>
) -> 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)
}
Expand Down

0 comments on commit dbf2c13

Please sign in to comment.