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

feat: impl IntoIterator on ByteArray #6817

Open
1 of 2 tasks
tdelabro opened this issue Dec 4, 2024 · 2 comments
Open
1 of 2 tasks

feat: impl IntoIterator on ByteArray #6817

tdelabro opened this issue Dec 4, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@tdelabro
Copy link
Contributor

tdelabro commented Dec 4, 2024

Feature Request

Describe the Feature Request

In the corelib.
I'm under the impression ByteArray doesn't implement IntoIterator, making it impossible to loop over using the language loop syntax.
But it implement index and len. So I think it could be possible to impl IntoIterator too. Is there a reason we didn't do it

I think it makes sense to impl IntoIterator<felt252> where the pending word is returned last, as it is, without any indication of pending_word_len

If the feature request is approved, would you be willing to submit a PR?
(Help can be provided if you need assistance submitting a PR)

  • Yes
  • No
@tdelabro tdelabro added the enhancement New feature or request label Dec 4, 2024
@tdelabro
Copy link
Contributor Author

tdelabro commented Dec 4, 2024

We should also implement the hash trait:

Is it h(data0, .., dataN, pending_word, pending_word_len)?

And the serde trait

@Nanle100
Copy link

Nanle100 commented Dec 7, 2024

i can work on this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants