Skip to content

Commit c917025

Browse files
committed
Add some missing trait impls
Fixes `ConditionEqual` missing Clone Trait #349
1 parent 2750f55 commit c917025

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/pattern.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ use crate::*;
6262
/// ```
6363
///
6464
/// [`FromStr`]: std::str::FromStr
65-
#[derive(Debug, PartialEq, Eq, Clone)]
65+
#[derive(Debug, Clone, PartialEq, Eq)]
6666
pub struct Pattern<L> {
6767
/// The actual pattern as a [`RecExpr`]
6868
pub ast: PatternAst<L>,

src/rewrite.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ where
398398
///
399399
/// [`apply_one`]: Applier::apply_one()
400400
/// [`check`]: Condition::check()
401-
#[derive(Clone, Debug)]
401+
#[derive(Clone, Debug, PartialEq, Eq)]
402402
pub struct ConditionalApplier<C, A> {
403403
/// The [`Condition`] to [`check`] before calling [`apply_one`] on
404404
/// `applier`.
@@ -493,7 +493,7 @@ where
493493
/// This condition adds its two [`Pattern`] to the egraph and passes
494494
/// if and only if they are equivalent (in the same eclass).
495495
///
496-
#[derive(Debug)]
496+
#[derive(Debug, Clone, PartialEq, Eq)]
497497
pub struct ConditionEqual<L> {
498498
p1: Pattern<L>,
499499
p2: Pattern<L>,

0 commit comments

Comments
 (0)