Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
enitrat committed Dec 23, 2024
1 parent 3a565a6 commit 60d2f18
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions corelib/src/option.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,9 @@ pub trait OptionTrait<T> {
/// assert!(Option::Some(4).unwrap_or_else(|| 2 * k) == 4);
/// assert!(Option::None.unwrap_or_else(|| 2 * k) == 20);
/// ```
fn unwrap_or_else<F, +Drop<F>, impl func: core::ops::FnOnce<F, ()>[Output: T], +Drop<func::Output>>(
fn unwrap_or_else<
F, +Drop<F>, impl func: core::ops::FnOnce<F, ()>[Output: T], +Drop<func::Output>,
>(
self: Option<T>, f: F,
) -> T;
}
Expand Down Expand Up @@ -306,7 +308,9 @@ pub impl OptionTraitImpl<T> of OptionTrait<T> {
}

#[inline]
fn unwrap_or_else<F, +Drop<F>, impl func: core::ops::FnOnce<F, ()>[Output: T], +Drop<func::Output>>(
fn unwrap_or_else<
F, +Drop<F>, impl func: core::ops::FnOnce<F, ()>[Output: T], +Drop<func::Output>,
>(
self: Option<T>, f: F,
) -> T {
match self {
Expand Down

0 comments on commit 60d2f18

Please sign in to comment.