rustfmt: add trailing commas in match arms, set fn call to block stle (#85)

This commit is contained in:
Sean McArthur
2017-09-12 19:29:06 -07:00
committed by Carl Lerche
parent de1edf4873
commit f7d14861e5
37 changed files with 894 additions and 973 deletions

View File

@@ -27,11 +27,12 @@ pub fn main() {
let _ = env_logger::init();
let tls_client_config = std::sync::Arc::new({
let mut c = rustls::ClientConfig::new();
c.root_store.add_server_trust_anchors(&webpki_roots::TLS_SERVER_ROOTS);
c.alpn_protocols.push(ALPN_H2.to_owned());
c
});
let mut c = rustls::ClientConfig::new();
c.root_store
.add_server_trust_anchors(&webpki_roots::TLS_SERVER_ROOTS);
c.alpn_protocols.push(ALPN_H2.to_owned());
c
});
// Sync DNS resolution.
let addr = "http2.akamai.com:443"

View File

@@ -36,10 +36,10 @@ impl Future for Process {
match try_ready!(self.body.poll()) {
Some(chunk) => {
println!("GOT CHUNK = {:?}", chunk);
}
},
None => {
self.trailers = true;
}
},
}
}
}

View File

@@ -1,4 +1,3 @@
extern crate bytes;
extern crate env_logger;
extern crate futures;
@@ -57,8 +56,9 @@ pub fn main() {
Ok(())
}).and_then(|_| {
println!("~~~~~~~~~~~~~~~~~~~~~~~~~~~ H2 connection CLOSE !!!!!! \
~~~~~~~~~~~");
println!(
"~~~~~~~~~~~~~~~~~~~~~~~~~~~ H2 connection CLOSE !!!!!! ~~~~~~~~~~~"
);
Ok(())
})
})

View File

@@ -1,4 +1,3 @@
extern crate bytes;
extern crate env_logger;
extern crate futures;
@@ -49,8 +48,9 @@ pub fn main() {
Ok(())
}).and_then(|_| {
println!("~~~~~~~~~~~~~~~~~~~~~~~~~~~ H2 connection CLOSE !!!!!! \
~~~~~~~~~~~");
println!(
"~~~~~~~~~~~~~~~~~~~~~~~~~~~ H2 connection CLOSE !!!!!! ~~~~~~~~~~~"
);
Ok(())
})
})