diff --git a/Cargo.toml b/Cargo.toml index ff76ea3..1eda8e4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,18 +12,18 @@ categories = ["web-programming::http-client"] publish = false # pre [dependencies] -base64 = "~0.6.0" +base64 = "0.9" bytes = "0.4" -encoding_rs = "0.7" -futures = "0.1.21" +encoding_rs = "0.8" +futures = "0.1.23" http = "0.1.5" -hyper = "0.12.2" +hyper = "0.12.7" hyper-old-types = { version = "0.11", optional = true, features = ["compat"] } hyper-tls = "0.3" libflate = "0.1.11" log = "0.4" mime = "0.3.7" -mime_guess = "2.0.0-alpha.4" +mime_guess = "2.0.0-alpha.6" native-tls = "0.2" serde = "1.0" serde_json = "1.0" diff --git a/examples/simple.rs b/examples/simple.rs index d23f702..7c79e9a 100644 --- a/examples/simple.rs +++ b/examples/simple.rs @@ -1,20 +1,11 @@ -#![allow(warnings)] // remove when error_chain is fixed +#![deny(warnings)] //! `cargo run --example simple` extern crate reqwest; extern crate env_logger; -#[macro_use] -extern crate error_chain; -error_chain! { - foreign_links { - ReqError(reqwest::Error); - IoError(std::io::Error); - } -} - -fn run() -> Result<()> { +fn main() -> Result<(), Box> { env_logger::init(); println!("GET https://www.rust-lang.org"); @@ -25,10 +16,8 @@ fn run() -> Result<()> { println!("Headers:\n{:?}", res.headers()); // copy the response body directly to stdout - let _ = std::io::copy(&mut res, &mut std::io::stdout())?; + std::io::copy(&mut res, &mut std::io::stdout())?; println!("\n\nDone."); Ok(()) } - -quick_main!(run);