From 9b5d6aab7e68cf776618151e9e69e34fd66aba6c Mon Sep 17 00:00:00 2001 From: Emily Eisenberg Date: Thu, 5 Feb 2015 21:13:05 -0800 Subject: [PATCH] fix(readme): Make the README client example work `res` needs to be unwrapped, we want to print out `body`, and `res` doesn't need to be mutable. --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 87a62fee29..f9ffd4d103 100644 --- a/README.md +++ b/README.md @@ -46,16 +46,16 @@ fn main() { let mut client = Client::new(); // Creating an outgoing request. - let mut res = client.get("http://www.gooogle.com/") + let res = client.get("http://www.gooogle.com/") // set a header .header(Connection(vec![Close])) // let 'er go! - .send(); + .send().unwrap(); // Read the Response. let body = res.read_to_string().unwrap(); - println!("Response: {}", res); + println!("Response: {}", body); } ```