Skip to content

Commit

Permalink
Merge pull request #88 from vohoanglong0107/lint-clippy
Browse files Browse the repository at this point in the history
fix: clippy lint
  • Loading branch information
Kobzol authored May 20, 2024
2 parents 3eb41f1 + 125b71d commit 73970be
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/bors/handlers/refresh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ async fn cancel_timed_out_builds<Client: RepositoryClient>(
let running_builds = db.get_running_builds(&repo.repository).await?;
tracing::info!("Found {} running build(s)", running_builds.len());

let timeout = repo.config.load().timeout.clone();
let timeout = repo.config.load().timeout;
for build in running_builds {
if elapsed_time(build.created_at) >= timeout {
tracing::info!("Cancelling build {}", build.commit_sha);
Expand Down
2 changes: 1 addition & 1 deletion src/permissions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ async fn load_users_from_team_api(
PermissionType::Try => "try",
};

let normalized_name = repository_name.replace("-", "_");
let normalized_name = repository_name.replace('-', "_");
let url = format!("https://team-api.infra.rust-lang.org/v1/permissions/bors.{normalized_name}.{permission}.json");
let users = reqwest::get(url)
.await
Expand Down
4 changes: 2 additions & 2 deletions src/tests/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ impl TestRepositoryClient {
.unwrap_or_else(|| panic!("Branch {branch} not found"));
assert_eq!(
history,
&sha.into_iter()
&sha.iter()
.map(|s| CommitSha(s.to_string()))
.collect::<Vec<_>>()
);
Expand Down Expand Up @@ -469,7 +469,7 @@ impl RepositoryClient for Arc<TestRepositoryClient> {
self.cancelled_workflows
.lock()
.unwrap()
.extend(run_ids.into_iter().map(|id| id.0));
.extend(run_ids.iter().map(|id| id.0));
Ok(())
}

Expand Down

0 comments on commit 73970be

Please sign in to comment.