format with rustfmt 0.8.3 (#148)

This commit is contained in:
Jon Gjengset
2017-04-26 15:25:49 -04:00
committed by Tim
parent e2728d84f3
commit 8bc01a993b
21 changed files with 363 additions and 312 deletions

View File

@@ -72,14 +72,17 @@ impl DoubleFutureService for DoubleServer {
fn main() {
let _ = env_logger::init();
let mut reactor = reactor::Core::new().unwrap();
let (add, server) = AddServer.listen("localhost:0".first_socket_addr(),
let (add, server) = AddServer
.listen("localhost:0".first_socket_addr(),
&reactor.handle(),
server::Options::default())
.unwrap();
reactor.handle().spawn(server);
let options = client::Options::default().handle(reactor.handle());
let add_client = reactor.run(add::FutureClient::connect(add.addr(), options)).unwrap();
let add_client = reactor
.run(add::FutureClient::connect(add.addr(), options))
.unwrap();
let (double, server) = DoubleServer::new(add_client)
.listen("localhost:0".first_socket_addr(),
@@ -88,14 +91,15 @@ fn main() {
.unwrap();
reactor.handle().spawn(server);
let double_client =
reactor.run(double::FutureClient::connect(double.addr(), client::Options::default()))
.unwrap();
reactor.run(futures::stream::futures_unordered((0..5).map(|i| double_client.double(i)))
.map_err(|e| println!("{}", e))
.for_each(|i| {
println!("{:?}", i);
Ok(())
}))
let double_client = reactor
.run(double::FutureClient::connect(double.addr(), client::Options::default()))
.unwrap();
reactor
.run(futures::stream::futures_unordered((0..5).map(|i| double_client.double(i)))
.map_err(|e| println!("{}", e))
.for_each(|i| {
println!("{:?}", i);
Ok(())
}))
.unwrap();
}