Skip to content

Commit 44e6926

Browse files
committed
Remove PartialEq from DepNodeColor
1 parent 42fc95d commit 44e6926

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

+1-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ pub struct MarkFrame<'a> {
5757
parent: Option<&'a MarkFrame<'a>>,
5858
}
5959

60-
#[derive(PartialEq)]
6160
enum DepNodeColor {
6261
Red,
6362
Green(DepNodeIndex),
@@ -932,7 +931,7 @@ impl<D: Deps> DepGraph<D> {
932931
/// Returns true if the given node has been marked as red during the
933932
/// current compilation session. Used in various assertions
934933
pub fn is_red(&self, dep_node: &DepNode) -> bool {
935-
self.node_color(dep_node) == Some(DepNodeColor::Red)
934+
matches!(self.node_color(dep_node), Some(DepNodeColor::Red))
936935
}
937936

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

0 commit comments

Comments
 (0)