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