diff --git a/crates/cdk/src/pub_sub.rs b/crates/cdk/src/pub_sub.rs index c5f98a33..f8365552 100644 --- a/crates/cdk/src/pub_sub.rs +++ b/crates/cdk/src/pub_sub.rs @@ -194,20 +194,20 @@ where } /// Try to subscribe to a specific event - pub async fn try_subscribe + TryInto>>>( - &self, - params: P, - ) -> Result, P::Error> { + pub async fn try_subscribe

(&self, params: P) -> Result, P::Error> + where + P: AsRef + TryInto>>, + { Ok(self .subscribe_inner(params.as_ref().clone(), params.try_into()?) .await) } /// Subscribe to a specific event - pub async fn subscribe + Into>>>( - &self, - params: P, - ) -> ActiveSubscription { + pub async fn subscribe

(&self, params: P) -> ActiveSubscription + where + P: AsRef + Into>>, + { self.subscribe_inner(params.as_ref().clone(), params.into()) .await }