1
0
Fork 0
firefox/third_party/rust/futures/tests/compat.rs
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

16 lines
463 B
Rust

#![cfg(feature = "compat")]
#![cfg(not(miri))] // Miri does not support epoll
use futures::compat::Future01CompatExt;
use futures::prelude::*;
use std::time::Instant;
use tokio::runtime::Runtime;
use tokio::timer::Delay;
#[test]
fn can_use_01_futures_in_a_03_future_running_on_a_01_executor() {
let f = async { Delay::new(Instant::now()).compat().await };
let mut runtime = Runtime::new().unwrap();
runtime.block_on(f.boxed().compat()).unwrap();
}