Skip to content

Commit 73970be

Browse files
authored
Merge pull request #88 from vohoanglong0107/lint-clippy
fix: clippy lint
2 parents 3eb41f1 + 125b71d commit 73970be

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/bors/handlers/refresh.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ async fn cancel_timed_out_builds<Client: RepositoryClient>(
3333
let running_builds = db.get_running_builds(&repo.repository).await?;
3434
tracing::info!("Found {} running build(s)", running_builds.len());
3535

36-
let timeout = repo.config.load().timeout.clone();
36+
let timeout = repo.config.load().timeout;
3737
for build in running_builds {
3838
if elapsed_time(build.created_at) >= timeout {
3939
tracing::info!("Cancelling build {}", build.commit_sha);

src/permissions.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ async fn load_users_from_team_api(
6161
PermissionType::Try => "try",
6262
};
6363

64-
let normalized_name = repository_name.replace("-", "_");
64+
let normalized_name = repository_name.replace('-', "_");
6565
let url = format!("https://team-api.infra.rust-lang.org/v1/permissions/bors.{normalized_name}.{permission}.json");
6666
let users = reqwest::get(url)
6767
.await

src/tests/state.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ impl TestRepositoryClient {
383383
.unwrap_or_else(|| panic!("Branch {branch} not found"));
384384
assert_eq!(
385385
history,
386-
&sha.into_iter()
386+
&sha.iter()
387387
.map(|s| CommitSha(s.to_string()))
388388
.collect::<Vec<_>>()
389389
);
@@ -469,7 +469,7 @@ impl RepositoryClient for Arc<TestRepositoryClient> {
469469
self.cancelled_workflows
470470
.lock()
471471
.unwrap()
472-
.extend(run_ids.into_iter().map(|id| id.0));
472+
.extend(run_ids.iter().map(|id| id.0));
473473
Ok(())
474474
}
475475

0 commit comments

Comments
 (0)