diff --git a/src/client.rs b/src/client.rs index 95a6894..0e57e9b 100644 --- a/src/client.rs +++ b/src/client.rs @@ -414,9 +414,7 @@ impl AuthClient { .client .get(format!( "{}{}/authorize?provider={}", - self.project_url, - AUTH_V1, - provider.to_string() + self.project_url, AUTH_V1, provider )) .headers(headers) .body(body) @@ -800,12 +798,12 @@ impl AuthClient { let res_body = response.text().await?; if res_status.is_success() { - return Ok(()); + Ok(()) } else { - return Err(Error::AuthError { + Err(Error::AuthError { status: res_status, message: res_body, - }); + }) } } diff --git a/tests/client_tests.rs b/tests/client_tests.rs index c909f57..dbec9e9 100644 --- a/tests/client_tests.rs +++ b/tests/client_tests.rs @@ -393,7 +393,7 @@ async fn test_sso_login() { let url = auth_client.sso(params).await.unwrap(); - println!("{}", url.to_string()); + println!("{}", url); assert!(url.to_string().len() > 1); } @@ -419,7 +419,7 @@ async fn get_settings_test() { let settings = auth_client.get_settings().await.unwrap(); - assert!(settings.external.github == true) + assert!(settings.external.github) } #[tokio::test] @@ -428,5 +428,5 @@ async fn get_health_test() { let health = auth_client.get_health().await.unwrap(); - assert!(health.description != "") + assert!(!health.description.is_empty()) }