Skip to content

Commit

Permalink
fix: remove FnOnceSnapImpl
Browse files Browse the repository at this point in the history
  • Loading branch information
julio4 committed Jan 6, 2025
1 parent 93d0cdb commit 978c723
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions corelib/src/ops/function.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,6 @@ impl FnOnceImpl<T, Args, +Destruct<T>, +Fn<T, Args>> of FnOnce<T, Args> {
}
}

/// An implementation of `FnOnce` when `Fn` is implemented and the receiver is by-reference.
/// Makes sure we can always pass an `Fn` to a function that expects an `FnOnce`.
impl FnOnceSnapImpl<T, Args, +Destruct<T>, +Fn<T, Args>> of FnOnce<@T, Args> {
type Output = Fn::<T, Args>::Output;
fn call(self: @T, args: Args) -> Self::Output {
Fn::call(self, args)
}
}

/// The version of the call operator that takes a by-snapshot receiver.
///
/// Instances of `Fn` can be called multiple times.
Expand Down

0 comments on commit 978c723

Please sign in to comment.