Skip to content

Commit

Permalink
format, nits
Browse files Browse the repository at this point in the history
  • Loading branch information
oflatt committed Aug 20, 2024
1 parent a8a8f9b commit 335744a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
3 changes: 0 additions & 3 deletions src/explain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1144,9 +1144,6 @@ impl<'x, L: Language> ExplainNodes<'x, L> {
&next_explanation,
rule,
) {
eprintln!("{:?}", current_explanation);
eprintln!("{:?}", rule.name);
eprintln!("{:?}", next_explanation);
return false;
}
}
Expand Down
6 changes: 5 additions & 1 deletion src/rewrite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,11 @@ where
for mat in matches {
if egraph.are_explanations_enabled() {
let sast = mat.ast.as_ref().map(|cow| cow.as_ref());
for (subst, lhs_term) in mat.substs.iter().zip(mat.lhs_terms.as_ref().unwrap().iter()) {
for (subst, lhs_term) in mat
.substs
.iter()
.zip(mat.lhs_terms.as_ref().unwrap().iter())
{
let ids = self.apply_one(egraph, *lhs_term, subst, sast, rule_name);
added.extend(ids)
}
Expand Down
4 changes: 1 addition & 3 deletions tests/explanation-cycle-constant-fold.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ pub type Rewrite = egg::Rewrite<Math, ()>;
pub type Runner = egg::Runner<Math, (), ()>;

fn is_not_zero(var: &str) -> impl Fn(&mut EGraph, Id, &Subst) -> bool {
|egraph, _, subst| {
true
}
|egraph, _, subst| true
}

#[test]
Expand Down

0 comments on commit 335744a

Please sign in to comment.