2017-12-13 09:34:46 -06:00
|
|
|
#![feature(conservative_impl_trait)]
|
|
|
|
|
2017-12-09 12:50:50 -06:00
|
|
|
extern crate futures;
|
|
|
|
extern crate tokio_core;
|
|
|
|
use futures::future::{self};
|
|
|
|
use futures::future::*;
|
|
|
|
use tokio_core::reactor::Core;
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let mut core = Core::new().expect("Failed to initialize tokio_core reactor!");
|
|
|
|
|
2017-12-13 09:34:46 -06:00
|
|
|
let f = test();
|
2017-12-09 12:50:50 -06:00
|
|
|
|
|
|
|
core.run(f).unwrap();
|
|
|
|
}
|
2017-12-13 09:34:46 -06:00
|
|
|
|
|
|
|
fn test() -> MapErr<(), ()> {
|
|
|
|
future::ok(())
|
|
|
|
.map_err(|String| ())
|
|
|
|
}
|