diff --git a/src/issuer.rs b/src/issuer.rs index 5a29f72..23d2c99 100644 --- a/src/issuer.rs +++ b/src/issuer.rs @@ -3,15 +3,15 @@ use reqwest::Url; // TODO these should all be const, or even better, static Urls... pub fn google() -> Url { - Url::parse("https://accounts.google.com").unwrap() + Url::parse("https://accounts.google.com").expect("Static urls should always work!") } pub fn paypal() -> Url { - Url::parse("https://www.paypalobjects.com/").unwrap() + Url::parse("https://www.paypalobjects.com/").expect("Static urls should always work!") } pub fn salesforce() -> Url { - Url::parse("https://login.salesforce.com").unwrap() + Url::parse("https://login.salesforce.com").expect("Static urls should always work!") } #[test] diff --git a/src/lib.rs b/src/lib.rs index 4f01fb4..94c48ce 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -144,7 +144,7 @@ impl Client { /// Passthrough to the redirect_url stored in inth_oauth2 as a str. pub fn redirect_url(&self) -> &str { - self.oauth.redirect_uri.as_ref().unwrap() + self.oauth.redirect_uri.as_ref().expect("We always require a redirect to construct client!") } /// Passthrough to the inth_oauth2::client's request token.