OAuth2Error FromResponse tweak

This commit is contained in:
Curtis McEnroe 2015-12-23 23:12:00 -05:00
parent 3c32646ea4
commit 3aa66c2d30
1 changed files with 1 additions and 2 deletions

View File

@ -88,8 +88,7 @@ impl Error for OAuth2Error {
impl FromResponse for OAuth2Error {
fn from_response(json: &Json) -> Result<Self, ParseError> {
let json = JsonHelper(json);
let obj = try!(json.as_object());
let obj = try!(JsonHelper(json).as_object());
let code = try!(obj.get_string("error"));
let description = obj.get_string_option("error_description");