From 7f60dfee69fb826a2645df7630c80e4c7bd0ad03 Mon Sep 17 00:00:00 2001 From: Augustin Villetard <73721937+augustin-v@users.noreply.github.com> Date: Tue, 7 Jan 2025 18:21:15 +0900 Subject: [PATCH] dev: remove variable on Felt252Dict get() (#7012) --- corelib/src/dict.cairo | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/corelib/src/dict.cairo b/corelib/src/dict.cairo index 7913a04ef67..b7a90455a96 100644 --- a/corelib/src/dict.cairo +++ b/corelib/src/dict.cairo @@ -153,10 +153,9 @@ impl Felt252DictImpl> of Felt252DictTrait { #[inline] fn get<+Copy>(ref self: Felt252Dict, key: felt252) -> T { - let (entry, prev_value) = felt252_dict_entry_get(self, key); - let return_value = prev_value; - self = felt252_dict_entry_finalize(entry, prev_value); - return_value + let (entry, value) = felt252_dict_entry_get(self, key); + self = felt252_dict_entry_finalize(entry, value); + value } #[inline(never)]