File tree Expand file tree Collapse file tree 3 files changed +10
-9
lines changed
site/src/request_handlers Expand file tree Collapse file tree 3 files changed +10
-9
lines changed Original file line number Diff line number Diff line change 11pub mod next_commit {
2+ use database:: Commit ;
3+
24 #[ derive( Debug , Clone , serde:: Serialize , serde:: Deserialize ) ]
3- pub struct Commit {
4- pub sha : String ,
5+ pub struct NextCommit {
6+ pub commit : Commit ,
57 pub include : Option < String > ,
68 pub exclude : Option < String > ,
79 pub runs : Option < i32 > ,
810 }
911
1012 #[ derive( Debug , Clone , serde:: Serialize , serde:: Deserialize ) ]
1113 pub struct Response {
12- pub commit : Option < Commit > ,
14+ pub commit : Option < NextCommit > ,
1315 }
1416}
Original file line number Diff line number Diff line change @@ -1008,12 +1008,11 @@ fn main_result() -> anyhow::Result<i32> {
10081008 // no missing commits
10091009 return Ok ( 0 ) ;
10101010 } ;
1011- let commit = get_commit_or_fake_it ( & next. sha ) ?;
10121011
10131012 let pool = database:: Pool :: open ( & db. db ) ;
10141013
1015- let sysroot = Sysroot :: install ( commit. sha . to_string ( ) , & target_triple)
1016- . with_context ( || format ! ( "failed to install sysroot for {:?}" , commit) ) ?;
1014+ let sysroot = Sysroot :: install ( next . commit . sha . to_string ( ) , & target_triple)
1015+ . with_context ( || format ! ( "failed to install sysroot for {:?}" , next . commit) ) ?;
10171016
10181017 let mut benchmarks = get_benchmarks (
10191018 & benchmark_dir,
@@ -1025,7 +1024,7 @@ fn main_result() -> anyhow::Result<i32> {
10251024 let res = bench (
10261025 & mut rt,
10271026 pool,
1028- & ArtifactId :: Commit ( commit) ,
1027+ & ArtifactId :: Commit ( next . commit ) ,
10291028 & Profile :: all ( ) ,
10301029 & Scenario :: all ( ) ,
10311030 bench_rustc. bench_rustc ,
Original file line number Diff line number Diff line change @@ -49,8 +49,8 @@ pub async fn handle_next_commit(ctxt: Arc<SiteCtxt>) -> next_commit::Response {
4949 commit. sha,
5050 missing_reason_dbg
5151 ) ;
52- Some ( next_commit:: Commit {
53- sha : commit. sha ,
52+ Some ( next_commit:: NextCommit {
53+ commit,
5454 include,
5555 exclude,
5656 runs,
You can’t perform that action at this time.
0 commit comments