Skip to content

Commit dd84de4

Browse files
committed
Deconstruct struct
1 parent 536fe50 commit dd84de4

File tree

1 file changed

+8
-19
lines changed

1 file changed

+8
-19
lines changed

site/src/selector.rs

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -700,33 +700,22 @@ impl SelfProfileQueryTime {
700700
let index = ctxt.index.load();
701701
let mut series = index
702702
.all_query_series()
703-
.filter(|tup| {
704-
benchmark.matches(tup.0)
705-
&& profile.matches(tup.1)
706-
&& scenario.matches(tup.2)
707-
&& ql.matches(tup.3)
703+
.filter(|&&(b, p, s, q)| {
704+
benchmark.matches(b) && profile.matches(p) && scenario.matches(s) && ql.matches(q)
708705
})
709706
.collect::<Vec<_>>();
710707

711708
series.sort_unstable();
712709

713710
let mut res = Vec::with_capacity(series.len());
714-
for path in series {
711+
for &(b, p, s, q) in series {
715712
res.push(SeriesResponse {
716-
series: SelfProfileQueryTime::new(
717-
artifact_ids.clone(),
718-
ctxt,
719-
path.0,
720-
path.1,
721-
path.2,
722-
path.3,
723-
)
724-
.await,
713+
series: SelfProfileQueryTime::new(artifact_ids.clone(), ctxt, b, p, s, q).await,
725714
path: Path::new()
726-
.set(PathComponent::Benchmark(path.0))
727-
.set(PathComponent::Profile(path.1))
728-
.set(PathComponent::Scenario(path.2))
729-
.set(PathComponent::QueryLabel(path.3)),
715+
.set(PathComponent::Benchmark(b))
716+
.set(PathComponent::Profile(p))
717+
.set(PathComponent::Scenario(s))
718+
.set(PathComponent::QueryLabel(q)),
730719
});
731720
}
732721
Ok(res)

0 commit comments

Comments
 (0)