Skip to content

Commit d447376

Browse files
committed
Remove unused errors field in Index
1 parent a665929 commit d447376

File tree

3 files changed

+0
-33
lines changed

3 files changed

+0
-33
lines changed

database/src/lib.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -406,8 +406,6 @@ pub struct Index {
406406
commits: Indexed<Commit>,
407407
/// Id lookup of published release artifacts
408408
artifacts: Indexed<Box<str>>,
409-
/// Id lookup of the errors for a crate
410-
errors: Indexed<Benchmark>,
411409
/// Id lookup of compile stat description ids
412410
/// For legacy reasons called `pstat_series` in the database, and so the name is kept here.
413411
pstat_series: Indexed<(Benchmark, Profile, Scenario, Metric)>,
@@ -607,10 +605,6 @@ impl Index {
607605
.collect()
608606
}
609607

610-
pub fn all_errors(&self) -> impl Iterator<Item = Benchmark> + '_ {
611-
self.errors.map.keys().copied()
612-
}
613-
614608
// FIXME: in theory this won't scale indefinitely as there's potentially
615609
// millions of queries and labels and iterating all of them is eventually
616610
// going to be impractical. But for now it performs quite well, so we'll go

database/src/pool/postgres.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -570,19 +570,6 @@ where
570570
)
571571
})
572572
.collect(),
573-
errors: self
574-
.conn()
575-
.query("select id, crate from error_series", &[])
576-
.await
577-
.unwrap()
578-
.into_iter()
579-
.map(|row| {
580-
(
581-
row.get::<_, i32>(0) as u32,
582-
row.get::<_, String>(1).as_str().into(),
583-
)
584-
})
585-
.collect(),
586573
pstat_series: self
587574
.conn()
588575
.query(

database/src/pool/sqlite.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -449,19 +449,6 @@ impl Connection for SqliteConnection {
449449
.unwrap()
450450
.map(|r| r.unwrap())
451451
.collect();
452-
let errors = self
453-
.raw()
454-
.prepare("select id, crate from error_series")
455-
.unwrap()
456-
.query_map(params![], |row| {
457-
Ok((
458-
row.get::<_, i32>(0)? as u32,
459-
row.get::<_, String>(1)?.as_str().into(),
460-
))
461-
})
462-
.unwrap()
463-
.map(|r| r.unwrap())
464-
.collect();
465452
let pstat_series = self
466453
.raw()
467454
.prepare("select id, crate, profile, cache, statistic from pstat_series;")
@@ -499,7 +486,6 @@ impl Connection for SqliteConnection {
499486
Index {
500487
commits,
501488
artifacts,
502-
errors,
503489
pstat_series,
504490
runtime_pstat_series,
505491
}

0 commit comments

Comments
 (0)