@@ -957,10 +957,10 @@ impl BenchmarkRequest {
957957 }
958958 }
959959
960- pub fn pr ( & self ) -> Option < & u32 > {
960+ pub fn pr ( & self ) -> Option < u32 > {
961961 match & self . commit_type {
962962 BenchmarkRequestType :: Try { pr, .. } | BenchmarkRequestType :: Master { pr, .. } => {
963- Some ( pr)
963+ Some ( * pr)
964964 }
965965 BenchmarkRequestType :: Release { .. } => None ,
966966 }
@@ -986,6 +986,10 @@ impl BenchmarkRequest {
986986 self . commit_date
987987 }
988988
989+ pub fn commit_type ( & self ) -> & BenchmarkRequestType {
990+ & self . commit_type
991+ }
992+
989993 pub fn is_master ( & self ) -> bool {
990994 matches ! ( self . commit_type, BenchmarkRequestType :: Master { .. } )
991995 }
@@ -1248,12 +1252,9 @@ pub struct InProgressRequestWithJobs {
12481252 pub parent : Option < ( BenchmarkRequest , Vec < BenchmarkJob > ) > ,
12491253}
12501254
1251- /// The data that can be retrived from the database directly to populate the
1252- /// status page
12531255#[ derive( Debug , PartialEq ) ]
1254- pub struct PartialStatusPageData {
1255- /// A Vector of; completed requests with any associated errors
1256- pub completed_requests : Vec < ( BenchmarkRequest , Vec < String > ) > ,
1257- /// In progress requests along with their associated jobs
1258- pub in_progress : Vec < InProgressRequestWithJobs > ,
1256+ pub struct BenchmarkRequestWithErrors {
1257+ pub request : BenchmarkRequest ,
1258+ /// Benchmark (name) -> error
1259+ pub errors : HashMap < String , String > ,
12591260}
0 commit comments