mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-13 00:00:24 +02:00
A first pass at updating Tokio to use `std::future`. Implementations of `Future` from the futures crate are updated to implement `Future` from std. Implementations of `Stream` are moved to a feature flag. This commits disables a number of crates that have not yet been updated.
19 lines
395 B
Rust
19 lines
395 B
Rust
#![deny(warnings, rust_2018_idioms)]
|
|
#![feature(await_macro, async_await)]
|
|
|
|
#[test]
|
|
fn block_on_ready() {
|
|
let mut enter = tokio_executor::enter().unwrap();
|
|
let val = enter.block_on(async { 123 });
|
|
|
|
assert_eq!(val, 123);
|
|
}
|
|
|
|
#[test]
|
|
fn block_on_pending() {
|
|
let mut enter = tokio_executor::enter().unwrap();
|
|
let val = enter.block_on(async { 123 });
|
|
|
|
assert_eq!(val, 123);
|
|
}
|