Skip to content
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

Fix ToAsciiArrayTrait::to_ascii_array return reversed array #193

Merged
merged 1 commit into from
Oct 17, 2023

Conversation

kfastov
Copy link
Contributor

@kfastov kfastov commented Oct 13, 2023

Pull Request type

Please check the type of change your PR introduces:

  • Bugfix

What is the current behavior?

Currently, when I use ToAsciiArrayTrait::to_ascii_array(), it behaves the same as ToAsciiArrayTrait::to_inverse_ascii_array() and returns reversed array (123.to_ascii_array() == array!['3', '2', '1']).
The reason behind it is that to_ascii_array() reverses the array but returns the unmodified array (because ArrayTraitExt::reverse() does not mutate)

Issue Number: N/A

What is the new behavior?

  • to_ascii_array() now returns ascii array with a correct order (123.to_ascii_array() == array!['1', '2', '3'])

Does this introduce a breaking change?

  • Yes, for code that relied on this buggy behavior
  • No, for any other code

Other information

@kfastov kfastov requested a review from 0xLucqs as a code owner October 13, 2023 13:01
@0xLucqs 0xLucqs merged commit 978090c into keep-starknet-strange:main Oct 17, 2023
3 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Oct 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants