From fdfbbcae20a21098ad6484c0b9da44314016b4f7 Mon Sep 17 00:00:00 2001 From: Saul Shanabrook Date: Wed, 11 Sep 2024 19:56:19 -0400 Subject: [PATCH] move subsumed directly to struct --- src/lib.rs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 602a254..deca9d2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -162,14 +162,6 @@ impl std::ops::Index<&ClassId> for EGraph { } } -#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] -#[derive(Debug, Default, Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] -pub struct NodeData { - // - #[cfg_attr(feature = "serde", serde(default))] - pub subsumed: bool, -} - #[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] #[derive(Clone, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)] pub struct Node { @@ -179,9 +171,8 @@ pub struct Node { pub eclass: ClassId, #[cfg_attr(feature = "serde", serde(default = "one"))] pub cost: Cost, - // Optional data about the node #[cfg_attr(feature = "serde", serde(default))] - pub data: NodeData, + pub subsumed: bool, } impl Node {