From 87b30635b5282bc0f1ab66ec46eca9cb5a0a296b Mon Sep 17 00:00:00 2001 From: Malatrax Date: Fri, 25 Oct 2024 17:40:48 +0200 Subject: [PATCH] refactor: remove generic_id from serialized output --- crates/cairo-lang-sierra-to-casm/src/compiler.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/crates/cairo-lang-sierra-to-casm/src/compiler.rs b/crates/cairo-lang-sierra-to-casm/src/compiler.rs index 7e62aec6b5b..f502d733332 100644 --- a/crates/cairo-lang-sierra-to-casm/src/compiler.rs +++ b/crates/cairo-lang-sierra-to-casm/src/compiler.rs @@ -151,7 +151,6 @@ pub struct CasmCairoEntryPoint { #[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] pub struct CasmCairoArg { - pub generic_id: GenericTypeId, pub size: i16, #[serde(skip_serializing_if = "skip_if_none")] pub debug_name: Option, @@ -159,7 +158,6 @@ pub struct CasmCairoArg { #[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] pub struct CasmCairoOutputArg { - pub generic_id: GenericTypeId, pub size: i16, #[serde(skip_serializing_if = "skip_if_none")] pub debug_name: Option, @@ -241,7 +239,7 @@ impl CasmCairoProgram { Either::Left(generic_id.0.as_str().to_case(Case::Snake)) } else { let size = *type_sizes.get(type_id).unwrap(); - Either::Right(CasmCairoArg { generic_id, size, debug_name }) + Either::Right(CasmCairoArg { size, debug_name }) } }); @@ -270,10 +268,8 @@ impl CasmCairoProgram { GenericArg::Type(ty) => { let debug_name = ty.debug_name.clone().map(|name| name.to_string()); - let generic_id = - type_resolver.get_generic_id(ty).clone(); let size = *type_sizes.get(ty).unwrap(); - Some(CasmCairoArg { generic_id, size, debug_name }) + Some(CasmCairoArg { size, debug_name }) } _ => None, }), @@ -283,7 +279,7 @@ impl CasmCairoProgram { None }; - CasmCairoOutputArg { generic_id, size, panic_inner_type, debug_name } + CasmCairoOutputArg { size, panic_inner_type, debug_name } }) .into_iter() .collect_vec();