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

Core Lib Documentation: byte_array module #6653

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

TAdev0
Copy link
Contributor

@TAdev0 TAdev0 commented Nov 13, 2024

No description provided.

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed all commit messages.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @TAdev0)


corelib/src/byte_array.cairo line 2 at r2 (raw file):

//! A dynamic, growable array of bytes where bytes are stored in multiples of 31 bytes,
//! with a `felt252` pending word used for bytes that don't complete a full `bytes31` word.

This sounds like an implementation detail.

can be included - but shouldn't be the start.

Note that the pub part of the ByteArray does not include this info.

Code quote:

//! A dynamic, growable array of bytes where bytes are stored in multiples of 31 bytes,
//! with a `felt252` pending word used for bytes that don't complete a full `bytes31` word.

@TAdev0
Copy link
Contributor Author

TAdev0 commented Nov 14, 2024

@orizi just updated, moving this sentence right before the ByteArray struct definition

Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed all commit messages.
Reviewable status: 0 of 1 files reviewed, 2 unresolved discussions (waiting on @TAdev0)


corelib/src/byte_array.cairo line 68 at r3 (raw file):

// TODO(yuval): don't allow creation of invalid ByteArray?
/// A dynamic, growable array of bytes where bytes are stored in multiples of 31 bytes,

same implementation detail - should probably not be emphasized.

Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed all commit messages.
Reviewable status: 0 of 1 files reviewed, 2 unresolved discussions (waiting on @TAdev0)


corelib/src/byte_array.cairo line 73 at r4 (raw file):

// TODO(yuval): don't allow creation of invalid ByteArray?
/// Cairo's `String` type.

it isn't - it is a bytearray - the string literal but can be used with it - but it deliberately isn't a string.

Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 1 of 1 files at r5, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @TAdev0)

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

Successfully merging this pull request may close these issues.

3 participants