Skip to content

Commit 3b903a7

Browse files
committed
Change from &mut Vec<Vec<_>> to &mut [Vec<_>], since the outer
`Vec` should not be resized.
1 parent f027612 commit 3b903a7

File tree

1 file changed

+2
-2
lines changed
  • src/librustc_mir/build/matches

1 file changed

+2
-2
lines changed

src/librustc_mir/build/matches/test.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ impl<'a,'tcx> Builder<'a,'tcx> {
295295
test_lvalue: &Lvalue<'tcx>,
296296
test: &Test<'tcx>,
297297
candidate: &Candidate<'pat, 'tcx>,
298-
resulting_candidates: &mut Vec<Vec<Candidate<'pat, 'tcx>>>) {
298+
resulting_candidates: &mut [Vec<Candidate<'pat, 'tcx>>]) {
299299
// Find the match_pair for this lvalue (if any). At present,
300300
// afaik, there can be at most one. (In the future, if we
301301
// adopted a more general `@` operator, there might be more
@@ -394,7 +394,7 @@ impl<'a,'tcx> Builder<'a,'tcx> {
394394

395395
fn add_to_all_candidate_sets<'pat>(&mut self,
396396
candidate: &Candidate<'pat, 'tcx>,
397-
resulting_candidates: &mut Vec<Vec<Candidate<'pat, 'tcx>>>) {
397+
resulting_candidates: &mut [Vec<Candidate<'pat, 'tcx>>]) {
398398
for resulting_candidate in resulting_candidates {
399399
resulting_candidate.push(candidate.clone());
400400
}

0 commit comments

Comments
 (0)