diff --git a/packages/yew/src/callback.rs b/packages/yew/src/callback.rs index 613457f7028..84aff3ab3e3 100644 --- a/packages/yew/src/callback.rs +++ b/packages/yew/src/callback.rs @@ -69,14 +69,14 @@ impl Default for Callback { impl Callback { /// Creates a new callback from another callback and a function /// That when emited will call that function and will emit the original callback - pub fn reform(&self, func: F) -> Callback + pub fn reform(&self, func: F) -> Callback where F: Fn(T) -> IN + 'static, { let this = self.clone(); let func = move |input| { let output = func(input); - this.emit(output); + this.emit(output) }; Callback::from(func) }