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:
@@ -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(())
|
||||
|
||||
Reference in New Issue
Block a user