extern crate futures; #[cfg(test)] mod tests { use futures::future::{ok, Future}; #[test] fn hello_futures() { let my_future = ok::("Hello".into()) .map(|hello| hello + ", Futures!"); let string_result = my_future.wait().unwrap(); assert_eq!(string_result, "Hello, Futures!"); } }