Breaking change: Mixin is now consumed, which means it works with FnOnce now
This commit is contained in:
parent
34709737c8
commit
59cce2e850
|
@ -7,12 +7,12 @@ pub use animation::AnimatedSignalVec;
|
|||
|
||||
|
||||
pub trait Mixin<A> {
|
||||
fn apply(&self, builder: A) -> A;
|
||||
fn apply(self, builder: A) -> A;
|
||||
}
|
||||
|
||||
impl<A, F> Mixin<A> for F where F: Fn(A) -> A {
|
||||
impl<A, F> Mixin<A> for F where F: FnOnce(A) -> A {
|
||||
#[inline]
|
||||
fn apply(&self, builder: A) -> A {
|
||||
fn apply(self, builder: A) -> A {
|
||||
self(builder)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue