Use assert_matches around the compiler

This commit is contained in:
Michael Goulet
2024-08-11 12:10:36 -04:00
parent 68d2e8a66e
commit c361c924a0
39 changed files with 100 additions and 49 deletions

View File

@@ -8,6 +8,7 @@
//! Typical examples would include: minimum element in SCC, maximum element
//! reachable from it, etc.
use std::assert_matches::debug_assert_matches;
use std::fmt::Debug;
use std::ops::Range;
@@ -569,7 +570,7 @@ where
// This None marks that we still have the initialize this node's frame.
debug!(?depth, ?node);
debug_assert!(matches!(self.node_states[node], NodeState::NotVisited));
debug_assert_matches!(self.node_states[node], NodeState::NotVisited);
// Push `node` onto the stack.
self.node_states[node] = NodeState::BeingVisited {