From ee5e9385d062c5a606d6a7033c3353c93b4d393f Mon Sep 17 00:00:00 2001 From: Dennis Garcia Date: Mon, 24 Jun 2024 15:30:22 -0500 Subject: [PATCH] fix: type annotations error fix for miden-wasm (#769) --- objects/src/testing/account.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/objects/src/testing/account.rs b/objects/src/testing/account.rs index dc2920af2..673e6d8d4 100644 --- a/objects/src/testing/account.rs +++ b/objects/src/testing/account.rs @@ -135,7 +135,9 @@ impl AccountBuilder { let inner_storage = self.storage_builder.build(); for (key, value) in inner_storage.slots().leaves() { - if key != AccountStorage::SLOT_LAYOUT_COMMITMENT_INDEX.into() { + // Explicitly cast to `u64` to silence "type annotations needed" error. + // Using `as u64` makes the intended type clear and avoids type inference issues. + if key != AccountStorage::SLOT_LAYOUT_COMMITMENT_INDEX as u64 { // don't copy the reserved key storage.set_item(key as u8, *value).map_err(AccountBuilderError::AccountError)?; }