Skip to content

Commit

Permalink
cargo clippy --tests --examples --fix (#496)
Browse files Browse the repository at this point in the history
Co-authored-by: MarcoFalke <*~=`'#}+{/-|&$^[email protected]>
  • Loading branch information
maflcko and MarcoFalke authored Jan 9, 2024
1 parent e61d669 commit 09581da
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ impl From<OAuthWire> for OAuth {
token_type: value.token_type,
scope: value.scope.split(',').map(ToString::to_string).collect(),
expires_in: value.expires_in,
refresh_token: value.refresh_token.map(|t| SecretString::from(t)),
refresh_token: value.refresh_token.map(SecretString::from),
refresh_token_expires_in: value.refresh_token_expires_in,
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/models/events/payload/push.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ mod test {
assert_eq!(payload.head, "eb1a60c03544dcea290f2d57bb66ae188ce25778");
assert_eq!(payload.before, "9b2afb3a8e03fb30cc09e5efb64823bde802cf59");
assert_eq!(payload.commits.len(), 1);
let commit = payload.commits.get(0).unwrap();
let commit = payload.commits.first().unwrap();
assert_eq!(commit.sha, "eb1a60c03544dcea290f2d57bb66ae188ce25778");
assert_eq!(
commit.author,
Expand Down
16 changes: 8 additions & 8 deletions tests/actions_self_hosted_runners.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ async fn test_context(
};
let server = setup_api(scope, method_name, actions_uri, None::<()>, template).await;
let client = Octocrab::builder()
.base_uri(&server.uri())
.base_uri(server.uri())
.unwrap()
.build()
.unwrap();
Expand Down Expand Up @@ -137,7 +137,7 @@ async fn test_context_with_request_body(
)
.await;
let client = Octocrab::builder()
.base_uri(&server.uri())
.base_uri(server.uri())
.unwrap()
.build()
.unwrap();
Expand Down Expand Up @@ -224,7 +224,7 @@ async fn should_return_org_jit_config() {
let test_context = test_context_with_request_body(
Scope::Org,
"POST",
&format!("/actions/runners/generate-jitconfig"),
"/actions/runners/generate-jitconfig",
StatusCode::CREATED,
jit_config_req.clone(),
Some(expected_response.clone()),
Expand Down Expand Up @@ -263,7 +263,7 @@ async fn should_return_repo_jit_config() {
let test_context = test_context_with_request_body(
Scope::Repo,
"POST",
&format!("/actions/runners/generate-jitconfig"),
"/actions/runners/generate-jitconfig",
StatusCode::CREATED,
jit_config_req.clone(),
Some(expected_response.clone()),
Expand Down Expand Up @@ -298,7 +298,7 @@ async fn should_return_org_registration_token() {
let test_context = test_context(
Scope::Org,
"POST",
&format!("/actions/runners/registration-token"),
"/actions/runners/registration-token",
StatusCode::CREATED,
Some(expected_token.clone()),
)
Expand All @@ -324,7 +324,7 @@ async fn should_return_repo_registration_token() {
let test_context = test_context(
Scope::Repo,
"POST",
&format!("/actions/runners/registration-token"),
"/actions/runners/registration-token",
StatusCode::CREATED,
Some(expected_token.clone()),
)
Expand All @@ -350,7 +350,7 @@ async fn should_return_org_remove_token() {
let test_context = test_context(
Scope::Org,
"POST",
&format!("/actions/runners/remove-token"),
"/actions/runners/remove-token",
StatusCode::CREATED,
Some(expected_token.clone()),
)
Expand All @@ -376,7 +376,7 @@ async fn should_return_repo_remove_token() {
let test_context = test_context(
Scope::Repo,
"POST",
&format!("/actions/runners/remove-token"),
"/actions/runners/remove-token",
StatusCode::CREATED,
Some(expected_token.clone()),
)
Expand Down
2 changes: 1 addition & 1 deletion tests/repo_contributors_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ async fn should_return_repo_contributors() {

let contributors = result.unwrap();

assert!(contributors.items.len() > 0);
assert!(!contributors.items.is_empty());

let Contributor {
author: Author { login, .. },
Expand Down

0 comments on commit 09581da

Please sign in to comment.