-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: N-02 Code Clarity Suggestions #588
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
@@ -32,15 +32,12 @@ mod MerkleWhitelistVotingStrategy { | |||
params: Span<felt252>, // [root: felt252] | |||
user_params: Span<felt252>, // [leaf: Leaf, proof: Array<felt252>] | |||
) -> u256 { | |||
let cache = user_params; // cache | |||
let mut params = params; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can add mut
keywrods to the params
and user_params
arguments directly, no need to re-bind :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh nice, updated. think there some other situations where we can do this. will have a look
@@ -47,7 +47,7 @@ impl StoreFelt252Array of Store<Array<felt252>> { | |||
offset += 1; | |||
|
|||
// Sequentially read all stored elements and append them to the array. | |||
let exit = len + offset; | |||
let exit = len * Store::<felt252>::size() + offset; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did this, what do you think 73a9269 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah thanks, that makes a lot of sense.
closes #564