File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -252,7 +252,7 @@ async fn validate_pr(
252252 }
253253
254254 let pr_assignment_descriptor_id =
255- get_descriptor_id_for_pr ( matched. sprints , pr_number) . expect ( "This PR does not exist" ) ;
255+ get_descriptor_id_for_pr ( & matched. sprints , pr_number) . expect ( "This PR does not exist" ) ;
256256 // This should never error, as a PR by this point in code must have been matched
257257 // with an assignment, and PR assignments must have an associated issue descriptor
258258
Original file line number Diff line number Diff line change @@ -1021,12 +1021,12 @@ fn match_pr_to_assignment(
10211021// Given a vector of sprints, and a target pr number, for a given person
10221022// return the issue ID for the associated assignment descriptor
10231023pub fn get_descriptor_id_for_pr (
1024- sprints : Vec < SprintWithSubmissions > ,
1024+ sprints : & [ SprintWithSubmissions ] ,
10251025 target_pr_number : u64 ,
10261026) -> Option < u64 > {
10271027 match sprints
10281028 . iter ( )
1029- . flat_map ( |sprint_with_subs| sprint_with_subs. submissions . clone ( ) )
1029+ . flat_map ( |sprint_with_subs| sprint_with_subs. submissions . iter ( ) )
10301030 . filter_map ( |missing_or_submission| match missing_or_submission {
10311031 SubmissionState :: Some ( s) => Some ( s) ,
10321032 _ => None ,
@@ -1038,7 +1038,7 @@ pub fn get_descriptor_id_for_pr(
10381038 Some ( Submission :: PullRequest {
10391039 assignment_issue_id,
10401040 ..
1041- } ) => Some ( assignment_issue_id) ,
1041+ } ) => Some ( * assignment_issue_id) ,
10421042 _ => None , // Was called with a nonexistent PR number, can't find an associated assignment
10431043 }
10441044}
You can’t perform that action at this time.
0 commit comments