From ab331e5248f0ba9a32469fb47379020a01e2bdd5 Mon Sep 17 00:00:00 2001 From: Luke Frisken Date: Sat, 30 May 2020 10:10:45 +0400 Subject: [PATCH] #1271 fix implementations to match function signature of trait --- yewtil/src/future.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/yewtil/src/future.rs b/yewtil/src/future.rs index a31c572ed55..62d77afab2a 100644 --- a/yewtil/src/future.rs +++ b/yewtil/src/future.rs @@ -43,11 +43,12 @@ pub trait LinkFuture { impl LinkFuture for ComponentLink { type Message = COMP::Message; - fn callback_future(&self, function: F) -> yew::Callback + fn callback_future(&self, function: F) -> yew::Callback where M: Into, FU: Future + 'static, - F: Fn(IN) -> FU + 'static { + FN: Fn(IN) -> FU + 'static, + { let link = self.clone(); let closure = move |input: IN| { @@ -87,11 +88,12 @@ impl LinkFuture for ComponentLink { impl LinkFuture for AgentLink { type Message = AGN::Message; - fn callback_future(&self, function: F) -> yew::Callback + fn callback_future(&self, function: F) -> yew::Callback where M: Into, FU: Future + 'static, - F: Fn(IN) -> FU + 'static { + FN: Fn(IN) -> FU + 'static, + { let link = self.clone(); let closure = move |input: IN| {