• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #![cfg(feature = "compat")]
2 
3 use tokio::timer::Delay;
4 use tokio::runtime::Runtime;
5 use std::time::Instant;
6 use futures::prelude::*;
7 use futures::compat::Future01CompatExt;
8 
9 #[test]
can_use_01_futures_in_a_03_future_running_on_a_01_executor()10 fn can_use_01_futures_in_a_03_future_running_on_a_01_executor() {
11     let f = async {
12         Delay::new(Instant::now()).compat().await
13     };
14 
15     let mut runtime = Runtime::new().unwrap();
16     runtime.block_on(f.boxed().compat()).unwrap();
17 }
18