Skip to content

Commit b8c151c

Browse files
committed
Remove for loop range
1 parent 71dd0b9 commit b8c151c

File tree

1 file changed

+2
-2
lines changed
  • compiler/rustc_data_structures/src/obligation_forest

1 file changed

+2
-2
lines changed

compiler/rustc_data_structures/src/obligation_forest/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ impl<O: ForestObligation> ObligationForest<O> {
612612
fn compress(&mut self, mut outcome_cb: impl FnMut(&O)) {
613613
let orig_nodes_len = self.nodes.len();
614614
let mut node_rewrites: Vec<_> = std::mem::take(&mut self.reused_node_vec);
615-
debug_assert!(node_rewrites.is_empty());
615+
assert!(node_rewrites.is_empty());
616616
node_rewrites.extend(0..orig_nodes_len);
617617
let mut dead_nodes = 0;
618618

@@ -623,7 +623,7 @@ impl<O: ForestObligation> ObligationForest<O> {
623623
// self.nodes[0..index - dead_nodes] are the first remaining nodes
624624
// self.nodes[index - dead_nodes..index] are all dead
625625
// self.nodes[index..] are unchanged
626-
for (index, node_rewrite) in node_rewrites[..orig_nodes_len].iter_mut().enumerate() {
626+
for (index, node_rewrite) in node_rewrites.iter_mut().enumerate() {
627627
let node = &self.nodes[index];
628628
match node.state.get() {
629629
NodeState::Pending | NodeState::Waiting => {

0 commit comments

Comments
 (0)