There are libraries that did not migrate to
futures 0.3, namely tokio-ping. There's an example:
let pinger = tokio_ping::Pinger::new(); let stream = pinger.and_then(move |pinger| Ok(pinger.chain(addr).stream()));
that gives an error:
90 | let stream = pinger.and_then(move |pinger| Ok(pinger.chain(ip).stream())); | ^^^^^^^^ method not found in `impl futures::future::Future`
So, the question is: how do I use older futures in recent tokio (0.2.21)? Can I somehow convert older futures to newer in application code?
Side question: do you know any ping libraries using new async syntax?