refactor all to async/await (#617)

Co-authored-by: Danny Browning <danny.browning@protectwise.com>
Co-authored-by: Daniel Eades <danieleades@hotmail.com>
This commit is contained in:
Sean McArthur
2019-09-06 17:22:56 -07:00
committed by GitHub
parent d7fcd8ac2e
commit ba7b2a754e
30 changed files with 1106 additions and 1430 deletions

View File

@@ -1,6 +1,5 @@
#![deny(warnings)]
//! `cargo run --example simple`
#![deny(warnings)]
fn main() -> Result<(), Box<dyn std::error::Error>> {
env_logger::init();
@@ -13,7 +12,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
println!("Headers:\n{:?}", res.headers());
// copy the response body directly to stdout
std::io::copy(&mut res, &mut std::io::stdout())?;
res.copy_to(&mut std::io::stdout())?;
println!("\n\nDone.");
Ok(())