Return Result from Client::auth_uri

This commit is contained in:
Curtis McEnroe 2015-11-28 13:23:38 -05:00
parent 52f73b4836
commit 82958bab00
1 changed files with 4 additions and 2 deletions

View File

@ -1,4 +1,6 @@
use url::{Url, ParseResult};
use url::{Url, form_urlencoded};
use super::Result;
/// OAuth 2.0 client.
pub struct Client {
@ -62,7 +64,7 @@ impl Client {
}
/// Constructs an authorization request URI.
pub fn auth_uri(&self, scope: Option<&str>, state: Option<&str>) -> ParseResult<String> {
pub fn auth_uri(&self, scope: Option<&str>, state: Option<&str>) -> Result<String> {
let mut uri = try!(Url::parse(&self.auth_uri));
let mut query_pairs = vec![