-
Notifications
You must be signed in to change notification settings - Fork 598
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this 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
There was a problem hiding this 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.
7100aaa
to
3a565a6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r4, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @enitrat)
There was a problem hiding this 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:complete! all files reviewed, all discussions resolved (waiting on @enitrat)
adds
unwrap_or_else
to OptionTrait