Skip to content

Commit

Permalink
Merge pull request #5 from imor/fix_clippy_warnings
Browse files Browse the repository at this point in the history
Fixed clippy warnings
  • Loading branch information
Proziam authored Oct 26, 2024
2 parents 2f6c0f7 + 16d409e commit 8d14d03
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
10 changes: 4 additions & 6 deletions src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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,
});
})
}
}

Expand Down
6 changes: 3 additions & 3 deletions tests/client_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -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]
Expand All @@ -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())
}

0 comments on commit 8d14d03

Please sign in to comment.