From 3aa66c2d30e7467bac8a0e3742d0c96ee2b383c3 Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Wed, 23 Dec 2015 23:12:00 -0500 Subject: [PATCH] OAuth2Error FromResponse tweak --- src/error.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/error.rs b/src/error.rs index ac867eb..7d65502 100644 --- a/src/error.rs +++ b/src/error.rs @@ -88,8 +88,7 @@ impl Error for OAuth2Error { impl FromResponse for OAuth2Error { fn from_response(json: &Json) -> Result { - 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");