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 7, 2025
1 parent 8fe8eb6 commit 2fd601f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
2 changes: 1 addition & 1 deletion corelib/src/iter.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,6 @@
//! ```
//!
//! [`map`]: Iterator::map
mod traits;
mod adapters;
mod traits;
pub use traits::{IntoIterator, Iterator};
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 2fd601f

Please sign in to comment.