Skip to content

Commit

Permalink
dev: remove variable on Felt252Dict get() (#7012)
Browse files Browse the repository at this point in the history
  • Loading branch information
augustin-v authored Jan 7, 2025
1 parent aaf01d4 commit 7f60dfe
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions corelib/src/dict.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,9 @@ impl Felt252DictImpl<T, +Felt252DictValue<T>> of Felt252DictTrait<T> {

#[inline]
fn get<+Copy<T>>(ref self: Felt252Dict<T>, 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)]
Expand Down

0 comments on commit 7f60dfe

Please sign in to comment.