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: Vec module #7025

Merged
merged 6 commits into from
Jan 9, 2025
Merged

Conversation

TAdev0
Copy link
Contributor

@TAdev0 TAdev0 commented Jan 8, 2025

No description provided.

@reviewable-StarkWare
Copy link

This change is Reviewable

This reverts commit a5d18b1.
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/starknet/storage/vec.cairo line 28 at r2 (raw file):

//!
//!    // Read element (returns Option)
//!    let value = self.my_vec.get(0).unwrap_or(0).read();

unwrap_or can't work here - as the returned value is an entry, not a value (that can be 0)

Code quote:

//!    let value = self.my_vec.get(0).unwrap_or(0).read();

Copy link
Contributor

@enitrat enitrat left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @orizi)


corelib/src/starknet/storage/vec.cairo line 28 at r2 (raw file):

Previously, orizi wrote…

unwrap_or can't work here - as the returned value is an entry, not a value (that can be 0)

Done.

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 r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @TAdev0)

@orizi orizi enabled auto-merge January 9, 2025 10:54
@orizi orizi added this pull request to the merge queue Jan 9, 2025
Merged via the queue into starkware-libs:main with commit c3ef80c Jan 9, 2025
47 checks passed
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.

4 participants