Skip to content

Commit 8bdb617

Browse files
committed
Remove PartialEq from DepNodeColor
1 parent 5768c16 commit 8bdb617

File tree

1 file changed

+1
-2
lines changed
  • compiler/rustc_query_system/src/dep_graph

1 file changed

+1
-2
lines changed

compiler/rustc_query_system/src/dep_graph/graph.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ pub struct MarkFrame<'a> {
6464
parent: Option<&'a MarkFrame<'a>>,
6565
}
6666

67-
#[derive(PartialEq)]
6867
enum DepNodeColor {
6968
Red,
7069
Green(DepNodeIndex),
@@ -925,7 +924,7 @@ impl<D: Deps> DepGraph<D> {
925924
/// Returns true if the given node has been marked as red during the
926925
/// current compilation session. Used in various assertions
927926
pub fn is_red(&self, dep_node: &DepNode) -> bool {
928-
self.node_color(dep_node) == Some(DepNodeColor::Red)
927+
matches!(self.node_color(dep_node), Some(DepNodeColor::Red))
929928
}
930929

931930
/// Returns true if the given node has been marked as green during the

0 commit comments

Comments
 (0)