From 3d5bf50978de3489ab87f127213b0209c44e9dc5 Mon Sep 17 00:00:00 2001 From: Wojciech Szymczyk Date: Mon, 4 Nov 2024 09:10:33 +0100 Subject: [PATCH] Wrap CallTraceV1 into Box for optimization (#22) Closes #21 ## Introduced changes - Fixed clippy warning for missing Box for CallTraceV1 (https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant) ## Checklist - [X] Linked relevant issue - [] Updated relevant documentation - [ ] Added relevant tests - [X] Performed self-review of the code - [ ] Added changes to `CHANGELOG.md` --- CHANGELOG.md | 3 +++ crates/cairo-annotations/src/trace_data.rs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 15a61af..011974e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,3 +6,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] + +- Wrapped CallTraceV1 into Box for better performance + diff --git a/crates/cairo-annotations/src/trace_data.rs b/crates/cairo-annotations/src/trace_data.rs index 7cb5622..16c5c34 100644 --- a/crates/cairo-annotations/src/trace_data.rs +++ b/crates/cairo-annotations/src/trace_data.rs @@ -50,7 +50,7 @@ pub struct CasmLevelInfo { /// Enum representing node of a trace of a call. #[derive(Debug, Clone, Serialize, Deserialize)] pub enum CallTraceNode { - EntryPointCall(CallTraceV1), + EntryPointCall(Box), DeployWithoutConstructor, }