Skip to content

Commit

Permalink
move subsumed directly to struct
Browse files Browse the repository at this point in the history
  • Loading branch information
saulshanabrook committed Sep 11, 2024
1 parent 325f7c6 commit fdfbbca
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down

0 comments on commit fdfbbca

Please sign in to comment.