@@ -66,47 +66,49 @@ pub async fn handle_compile_detail_sections(
6666) -> ServerResult < detail_sections:: Response > {
6767 log:: info!( "handle_compile_detail_sections({:?})" , request) ;
6868
69- let artifact_ids = Arc :: new ( master_artifact_ids_for_range (
70- & ctxt,
71- request. start ,
72- request. end ,
73- ) ) ;
69+ let start_artifact = ctxt
70+ . artifact_id_for_bound ( request. start . clone ( ) , true )
71+ . ok_or ( format ! (
72+ "could not find start commit for bound {:?}" ,
73+ request. start
74+ ) ) ?;
75+ let end_artifact = ctxt
76+ . artifact_id_for_bound ( request. end . clone ( ) , false )
77+ . ok_or ( format ! (
78+ "could not find end commit for bound {:?}" ,
79+ request. end
80+ ) ) ?;
7481
7582 let scenario = request. scenario . parse ( ) ?;
7683
7784 async fn calculate_sections (
7885 ctxt : & SiteCtxt ,
79- aid : Option < & ArtifactId > ,
86+ aid : ArtifactId ,
8087 benchmark : & str ,
8188 profile : & str ,
8289 scenario : Scenario ,
8390 ) -> Option < CompilationSections > {
84- match aid {
85- Some ( aid) => {
86- get_or_download_self_profile ( ctxt, aid. clone ( ) , benchmark, profile, scenario, None )
87- . await
88- . ok ( )
89- . map ( |profile| CompilationSections {
90- sections : profile. compilation_sections ,
91- } )
92- }
93- None => None ,
94- }
91+ get_or_download_self_profile ( ctxt, aid, benchmark, profile, scenario, None )
92+ . await
93+ . ok ( )
94+ . map ( |profile| CompilationSections {
95+ sections : profile. compilation_sections ,
96+ } )
9597 }
9698
9799 // Doc queries are not split into the classic frontend/backend/linker parts.
98100 let ( before, after) = if request. profile != "doc" {
99101 tokio:: join!(
100102 calculate_sections(
101103 & ctxt,
102- artifact_ids . get ( 0 ) ,
104+ start_artifact ,
103105 & request. benchmark,
104106 & request. profile,
105107 scenario,
106108 ) ,
107109 calculate_sections(
108110 & ctxt,
109- artifact_ids . get ( 1 ) ,
111+ end_artifact ,
110112 & request. benchmark,
111113 & request. profile,
112114 scenario,
0 commit comments