Skip to content

Commit

Permalink
fix: ensure felt doesn't need import
Browse files Browse the repository at this point in the history
  • Loading branch information
glihm committed Nov 4, 2024
1 parent 7adc7d5 commit 9146169
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/cairo-serde-derive/src/derive_enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<Vec<_>>();
let cairo_deserialize = quote! {
fn cairo_deserialize(felt: &[Felt], offset: usize) -> Result<Self::RustType, ::cainome_cairo_serde::Error> {
fn cairo_deserialize(felt: &[::starknet::core::types::Felt], offset: usize) -> Result<Self::RustType, ::cainome_cairo_serde::Error> {
let offset = offset + 1;
#(
if felt[offset - 1] == ::starknet::core::types::Felt::from(#deserialize_matches) {
Expand Down
2 changes: 1 addition & 1 deletion crates/cairo-serde-derive/src/derive_struct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Self::RustType, ::cainome_cairo_serde::Error> {
fn cairo_deserialize(felt: &[::starknet::core::types::Felt], offset: usize) -> Result<Self::RustType, ::cainome_cairo_serde::Error> {
let mut current_offset = offset;
Ok(Self {
#(
Expand Down

0 comments on commit 9146169

Please sign in to comment.