Skip to content

Commit 01d7fbe

Browse files
committed
Renaming
1 parent 6d467df commit 01d7fbe

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

webgraph/src/graphs/arc_list_graph.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ impl<L: Clone + 'static, I: IntoIterator<Item = (usize, usize, L)> + Clone> Lend
115115
if node >= self.next_node {
116116
break;
117117
}
118-
debug_assert!(node == self.next_node - 1);
118+
assert!(node == self.next_node - 1);
119119
self.iter.next();
120120
}
121121

@@ -204,10 +204,9 @@ impl<L, I: IntoIterator<Item = (usize, usize, L)>> Iterator for Succ<'_, L, I> {
204204
let triple = self.node_iter.iter.next();
205205
// Peek already checks this and the compiler doesn't seem to optimize it out
206206
// so we use unwrap_unchecked here.
207-
debug_assert!(triple.is_some(), "peek should have already checked this");
208-
let triple = unsafe { triple.unwrap_unchecked() };
207+
let (curr, succ, label) = unsafe { triple.unwrap_unchecked() };
209208
// Here `next_node` is one beyond the node whose successors we are returning
210-
debug_assert_eq!(triple.0, self.node_iter.next_node - 1);
211-
Some((triple.1, triple.2))
209+
assert_eq!(curr, self.node_iter.next_node - 1);
210+
Some((succ, label))
212211
}
213212
}

0 commit comments

Comments
 (0)