Skip to content

Commit 33f721f

Browse files
committed
Fix Clippy
1 parent ab5a017 commit 33f721f

File tree

3 files changed

+13
-18
lines changed

3 files changed

+13
-18
lines changed

collector/src/bin/collector.rs

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1528,24 +1528,19 @@ async fn run_benchmark_job(
15281528
Toolchain::from_sysroot(&sysroot, commit.sha.clone())
15291529
}
15301530
ArtifactId::Tag(tag) => {
1531-
create_toolchain_from_published_version(&tag, job.target().as_str())?
1531+
create_toolchain_from_published_version(tag, job.target().as_str())?
15321532
}
15331533
};
15341534
log::info!("Sysroot download finished");
15351535

1536-
let (compile_config, runtime_config) = create_benchmark_configs(
1537-
conn,
1538-
&toolchain,
1539-
&artifact_id,
1540-
&job,
1541-
&all_compile_benchmarks,
1542-
)
1543-
.await
1544-
.map_err(|error| {
1545-
BenchmarkJobError::Permanent(anyhow::anyhow!(
1546-
"Cannot prepare benchmark configs: {error:?}"
1547-
))
1548-
})?;
1536+
let (compile_config, runtime_config) =
1537+
create_benchmark_configs(conn, &toolchain, &artifact_id, job, all_compile_benchmarks)
1538+
.await
1539+
.map_err(|error| {
1540+
BenchmarkJobError::Permanent(anyhow::anyhow!(
1541+
"Cannot prepare benchmark configs: {error:?}"
1542+
))
1543+
})?;
15491544

15501545
let shared = SharedBenchmarkConfig {
15511546
artifact_id,
@@ -1594,7 +1589,7 @@ async fn create_benchmark_configs(
15941589
let compile_config = if bench_rustc || !bench_compile_benchmarks.is_empty() {
15951590
Some(CompileBenchmarkConfig {
15961591
benchmarks: all_compile_benchmarks
1597-
.into_iter()
1592+
.iter()
15981593
.filter(|b| bench_compile_benchmarks.contains(&b.name))
15991594
.cloned()
16001595
.collect(),

database/src/pool.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1152,11 +1152,11 @@ mod tests {
11521152

11531153
assert_eq!(collector_configs[0].name(), collector_name_one);
11541154
assert_eq!(collector_configs[0].benchmark_set(), benchmark_set_one);
1155-
assert_eq!(collector_configs[0].is_active(), true);
1155+
assert!(collector_configs[0].is_active());
11561156

11571157
assert_eq!(collector_configs[1].name(), collector_name_two);
11581158
assert_eq!(collector_configs[1].benchmark_set(), benchmark_set_two);
1159-
assert_eq!(collector_configs[1].is_active(), true);
1159+
assert!(collector_configs[1].is_active());
11601160

11611161
Ok(ctx)
11621162
})

site/src/request_handlers/github.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ Otherwise LGTM."#),
464464
@r#"Some(Ok(QueueCommand { params: BenchmarkParameters { include: Some("foo,bar"), exclude: None, runs: None, backends: None } }))"#);
465465
}
466466

467-
fn get_build_commands(body: &str) -> Vec<Result<BuildCommand, String>> {
467+
fn get_build_commands(body: &str) -> Vec<Result<BuildCommand<'_>, String>> {
468468
parse_build_commands(body).collect()
469469
}
470470

0 commit comments

Comments
 (0)