diff --git a/examples/reply/Cargo.toml b/examples/reply/Cargo.toml index 5e01705..713e832 100644 --- a/examples/reply/Cargo.toml +++ b/examples/reply/Cargo.toml @@ -8,5 +8,4 @@ publish = false safe-vk = { path = "../../safe-vk", features = ["macros"] } serde_json = "1.0.117" serde = "1.0.203" -rand = { version = "0.8.5", features = ["small_rng"] } tokio = { version = "1", features = ["full"] } diff --git a/safe-vk/src/start_polling.rs b/safe-vk/src/start_polling.rs index c7dfb05..a18678e 100644 --- a/safe-vk/src/start_polling.rs +++ b/safe-vk/src/start_polling.rs @@ -15,9 +15,8 @@ pub struct Polling { pub fn start_polling(token: &str, safevk: M) -> Polling where - M: Service<(), Response = S>, - S: Service + Clone + Send + 'static, - S::Future: Send, + M: Service + Send + Clone + 'static, + >::Future: Send, { let request = RequestBuilder::new(token); Polling { @@ -29,10 +28,8 @@ where impl IntoFuture for Polling where - M: Service<(), Response = S> + Send + Clone + 'static + Service, + M: Service + Send + Clone + 'static, >::Future: Send, - S: Service + Clone + Send + 'static, - S::Future: Send, { type Output = Response<()>; type IntoFuture = PollFuture; @@ -53,9 +50,7 @@ where Ok(res) => { if let Some(updates) = res.updates { for event in updates { - poll_fn(|cx| >::poll_ready(&mut safevk, cx)) - .await - .unwrap(); + poll_fn(|cx| safevk.poll_ready(cx)).await.unwrap(); let request_clone = Arc::clone(&request); let mut safevk = safevk.clone();