mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00
move code out of loop
This commit is contained in:
parent
3cf5cc37f7
commit
0716b882ba
@ -960,13 +960,6 @@ fn find_candidate(
|
|||||||
};
|
};
|
||||||
|
|
||||||
while let Some(mut frame) = backtrack_stack.pop() {
|
while let Some(mut frame) = backtrack_stack.pop() {
|
||||||
let next = frame
|
|
||||||
.remaining_candidates
|
|
||||||
.next(&mut frame.conflicting_activations, &frame.context);
|
|
||||||
let Some((candidate, has_another)) = next else {
|
|
||||||
panic!("why did we save a frame that has no next?");
|
|
||||||
};
|
|
||||||
|
|
||||||
// If all members of `conflicting_activations` are still
|
// If all members of `conflicting_activations` are still
|
||||||
// active in this back up we know that we're guaranteed to not actually
|
// active in this back up we know that we're guaranteed to not actually
|
||||||
// make any progress. As a result if we hit this condition we can
|
// make any progress. As a result if we hit this condition we can
|
||||||
@ -999,6 +992,11 @@ fn find_candidate(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let (candidate, has_another) = frame
|
||||||
|
.remaining_candidates
|
||||||
|
.next(&mut frame.conflicting_activations, &frame.context)
|
||||||
|
.expect("why did we save a frame that has no next?");
|
||||||
|
|
||||||
return Some((candidate, has_another, frame));
|
return Some((candidate, has_another, frame));
|
||||||
}
|
}
|
||||||
None
|
None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user