From 6a95a7e19e1cceee4f7d8af8c1ad9218ba6190c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Huchet?= Date: Mon, 15 May 2017 23:37:31 +0200 Subject: [PATCH] Update client.rs --- src/client.rs | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/client.rs b/src/client.rs index f521154..191484e 100644 --- a/src/client.rs +++ b/src/client.rs @@ -32,18 +32,19 @@ static DEFAULT_USER_AGENT: &'static str = concat!(env!("CARGO_PKG_NAME"), "/", e /// # Examples /// /// ```no_run -/// extern crate reqwest; +/// # extern crate reqwest; +/// # +/// # use reqwest::{Error, Client}; +/// # +/// # fn run() -> Result<(), Error> { +/// let client = Client::new()?; +/// client.get("http://httpbin.org/").send()?; +/// # Ok(()) +/// # } /// -/// use reqwest::{Error, Client}; -/// -/// fn run() -> Result<(), Error> { -/// Client::new()?.get("http://httpbin.org/").send()?; -/// Ok(()) -/// } -/// -/// fn main() { -/// run().unwrap(); -/// } +/// # fn main() { +/// # run().unwrap(); +/// # } /// ``` #[derive(Clone)] pub struct Client {