-
Notifications
You must be signed in to change notification settings - Fork 105
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
Upgrade to 2.7.0 #321
Upgrade to 2.7.0 #321
Conversation
@0xLucqs Ready for review. |
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.
^
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.
Random things I've noticed (not necessarily enabled by 2.7.0):
- in
bytes/src/utils.cairo
,uint_min
can be removed, replaced bycore::cmp::min
- there's probably something that can be done with iterators on ByteReader, Queue, Stack, Vec and elsewhere(?)
Since we now have const arrays (❤️ dw
❤️), IMO it's worth adding optimized pow2
and pow10
as these are the most commonly used power functions. Even in Alexandria, all the bitshift fns use pow(2, n)
.
Also would leave for another PR 😅 , please open an issue for that |
@gaetbout we should suppress the warnings on compilation otherwise it's going to appear on all dependent repositories |
I removed all warnings that are from the code of alexandria lib. |
my point is: what currently is used inside alexandria itself should not be triggering warnings |
Ok, I understood your point thanks! |
@0xLucqs ? |
@0xLucqs ? :D |
I want @milancermak to approve as well |
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.
LGTM! Leaving just a bunch of nits.
If you fancy, there's a bunch of places where the while-let
can be updated to a for-in
(e.g. in array_ext.cairo or sha256.cairo, though the latter is deprecated, so meh).
Pull Request type
Please check the type of change your PR introduces:
What is the new behavior?
Made some function deprecated.
Upgrade the code to 2.7
Fixed all warnings
Tried to make some fn generic (didn't look through all of em)
Replaced some while pop_front to for loop
Updated all assert to assert! and removed their error message as the default one is a good enough default value