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(corelib): OptionTrait::unwrap_or_else #6913

Merged
merged 3 commits into from
Dec 23, 2024

Conversation

enitrat
Copy link
Contributor

@enitrat enitrat commented Dec 23, 2024

adds unwrap_or_else to OptionTrait

@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.

:lgtm:

Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @enitrat)


a discussion (no related file):
@TomerStarkware 2nd eye.

Copy link
Collaborator

@TomerStarkware TomerStarkware 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: all files reviewed, 3 unresolved discussions (waiting on @enitrat)


corelib/src/option.cairo line 249 at r1 (raw file):

    /// assert!(Option::None.unwrap_or_else(|| 2 * k) == 20);
    /// ```
    fn unwrap_or_else<F, +Drop<F>, impl func: core::ops::Fn<F, ()>[Output: T], +Drop<func::Output>>(

core::ops::FnOnce

Code quote:

core::ops::Fn

corelib/src/option.cairo line 309 at r1 (raw file):

    #[inline]
    fn unwrap_or_else<F, +Drop<F>, impl func: core::ops::Fn<F, ()>[Output: T], +Drop<func::Output>>(

core::ops::FnOnce

Suggestion:

core::ops::Fn

Copy link
Contributor Author

@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: 1 of 2 files reviewed, 3 unresolved discussions (waiting on @orizi and @TomerStarkware)


corelib/src/option.cairo line 249 at r1 (raw file):

Previously, TomerStarkware wrote…

core::ops::FnOnce

Done.


corelib/src/option.cairo line 309 at r1 (raw file):

Previously, TomerStarkware wrote…

core::ops::FnOnce

Done.

@enitrat enitrat force-pushed the feat/unwrap-or-else branch from 7100aaa to 3a565a6 Compare December 23, 2024 17:40
Copy link
Collaborator

@TomerStarkware TomerStarkware 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 r4, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @enitrat)

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: :shipit: complete! all files reviewed, all discussions resolved (waiting on @enitrat)

@orizi orizi enabled auto-merge December 23, 2024 20:11
@orizi orizi added this pull request to the merge queue Dec 23, 2024
Merged via the queue into starkware-libs:main with commit 5c9f2d2 Dec 23, 2024
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