From b55ccdc4f49c8221b4826ae01185fadf330481d1 Mon Sep 17 00:00:00 2001 From: Zachary Bonagura Date: Fri, 4 Oct 2024 13:27:21 -0400 Subject: [PATCH] Fixed formatting errors --- aris/src/expr.rs | 2 +- aris/src/proofs.rs | 2 +- aris/src/rules.rs | 2 +- bindings/js/src/proofs.rs | 1 + bindings/js/src/rules.rs | 1 + 5 files changed, 5 insertions(+), 3 deletions(-) diff --git a/aris/src/expr.rs b/aris/src/expr.rs index 4a05920d..e41afc85 100644 --- a/aris/src/expr.rs +++ b/aris/src/expr.rs @@ -389,7 +389,7 @@ pub fn unify(mut c: HashSet) -> Option { } (Expr::Apply { func: sf, args: sa }, Expr::Apply { func: tf, args: ta }) if sa.len() == ta.len() => { c.insert(Constraint::Equal(*sf, *tf)); - c.extend(sa.into_iter().zip(ta.into_iter()).map(|(x, y)| Constraint::Equal(x, y))); + c.extend(sa.into_iter().zip(ta).map(|(x, y)| Constraint::Equal(x, y))); unify(c) } (Expr::Assoc { op: so, exprs: se }, Expr::Assoc { op: to, exprs: te }) if so == to && se.len() == te.len() => { diff --git a/aris/src/proofs.rs b/aris/src/proofs.rs index 559ed52e..fbcecbf4 100644 --- a/aris/src/proofs.rs +++ b/aris/src/proofs.rs @@ -255,7 +255,7 @@ pub trait Proof: Sized { } fn contained_justifications(&self, include_premises: bool) -> HashSet> { let mut ret = self.lines().into_iter().filter_map(|x| x.fold(hlist![|r: Self::JustificationReference| Some(vec![r].into_iter().map(Coproduct::inject).collect()), |r: Self::SubproofReference| self.lookup_subproof(&r).map(|sub| sub.contained_justifications(include_premises)),])).fold(HashSet::new(), |mut x, y| { - x.extend(y.into_iter()); + x.extend(y); x }); if include_premises { diff --git a/aris/src/rules.rs b/aris/src/rules.rs index 0cbc6e4c..56e5d613 100644 --- a/aris/src/rules.rs +++ b/aris/src/rules.rs @@ -202,8 +202,8 @@ pub type Rule = SharedChecks { diff --git a/bindings/js/src/proofs.rs b/bindings/js/src/proofs.rs index cc39b4fa..96900275 100644 --- a/bindings/js/src/proofs.rs +++ b/bindings/js/src/proofs.rs @@ -228,6 +228,7 @@ impl Proof { } #[wasm_bindgen] +#[allow(dead_code)] pub struct Subproof(Sp); #[wasm_bindgen] diff --git a/bindings/js/src/rules.rs b/bindings/js/src/rules.rs index 35a62749..991b4952 100644 --- a/bindings/js/src/rules.rs +++ b/bindings/js/src/rules.rs @@ -12,6 +12,7 @@ pub fn rule_names() -> JsResult> { } #[wasm_bindgen] +#[allow(dead_code)] pub struct Rule(aris::rules::Rule); #[wasm_bindgen]