From 91461692beff61040043c81fc7d865251bbc07d9 Mon Sep 17 00:00:00 2001 From: glihm Date: Mon, 4 Nov 2024 17:14:00 -0600 Subject: [PATCH] fix: ensure felt doesn't need import --- crates/cairo-serde-derive/src/derive_enum.rs | 2 +- crates/cairo-serde-derive/src/derive_struct.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/cairo-serde-derive/src/derive_enum.rs b/crates/cairo-serde-derive/src/derive_enum.rs index 2e17ff6..ea48339 100644 --- a/crates/cairo-serde-derive/src/derive_enum.rs +++ b/crates/cairo-serde-derive/src/derive_enum.rs @@ -47,7 +47,7 @@ pub fn derive_enum(ident: Ident, data: DataEnum) -> TokenStream { .map(|(i, _)| syn::LitInt::new(&i.to_string(), Span::call_site())) .collect::>(); let cairo_deserialize = quote! { - fn cairo_deserialize(felt: &[Felt], offset: usize) -> Result { + fn cairo_deserialize(felt: &[::starknet::core::types::Felt], offset: usize) -> Result { let offset = offset + 1; #( if felt[offset - 1] == ::starknet::core::types::Felt::from(#deserialize_matches) { diff --git a/crates/cairo-serde-derive/src/derive_struct.rs b/crates/cairo-serde-derive/src/derive_struct.rs index 0df849a..6b02801 100644 --- a/crates/cairo-serde-derive/src/derive_struct.rs +++ b/crates/cairo-serde-derive/src/derive_struct.rs @@ -25,7 +25,7 @@ pub fn derive_struct(ident: Ident, data: DataStruct) -> TokenStream { }; let cairo_deserialize = quote! { - fn cairo_deserialize(felt: &[Felt], offset: usize) -> Result { + fn cairo_deserialize(felt: &[::starknet::core::types::Felt], offset: usize) -> Result { let mut current_offset = offset; Ok(Self { #(