blob: 39adc7cba41ba00d793df9bdb135ced7f5cd7e57 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#![cfg(feature = "compat")]
use tokio::timer::Delay;
use tokio::runtime::Runtime;
use std::time::Instant;
use futures::prelude::*;
use futures::compat::Future01CompatExt;
#[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();
}
|