Fix bugs in README example (#441)

Fix missing > in method return signature, undeclared variable, and
adds return type to match method signature.
This commit is contained in:
puffybsd
2019-01-16 00:23:41 -05:00
committed by Sean McArthur
parent 94535ece88
commit 56c1c02b84

View File

@@ -20,10 +20,11 @@ extern crate reqwest;
use std::collections::HashMap;
fn main() -> Result<(), Box<std::error::Error> {
let res: HashMap<String, String> = reqwest::get("https://httpbin.org/ip")?
fn main() -> Result<(), Box<std::error::Error>> {
let resp: HashMap<String, String> = reqwest::get("https://httpbin.org/ip")?
.json()?;
println!("{:#?}", resp);
Ok(())
}
```