mirror of
https://github.com/circify/circ.git
synced 2026-01-10 06:08:02 -05:00
lint (#181)
This commit is contained in:
@@ -664,6 +664,14 @@ impl NaryFlat<Integer> for IntNaryOp {
|
||||
}
|
||||
}
|
||||
|
||||
fn safe_nary(op: Op, mut children: Vec<Term>) -> Term {
|
||||
match children.len() {
|
||||
0 => panic!("Empty {}", op),
|
||||
1 => children.pop().unwrap(),
|
||||
_ => term(op, children),
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use super::*;
|
||||
@@ -767,11 +775,3 @@ mod test {
|
||||
assert_eq!(fold(&before, &[]), ex_after);
|
||||
}
|
||||
}
|
||||
|
||||
fn safe_nary(op: Op, mut children: Vec<Term>) -> Term {
|
||||
match children.len() {
|
||||
0 => panic!("Empty {}", op),
|
||||
1 => children.pop().unwrap(),
|
||||
_ => term(op, children),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ pub fn check_ram(c: &mut Computation, ram: Ram) {
|
||||
BoundaryConditions::Persistent(..) => panic!(),
|
||||
};
|
||||
let id = ram.id;
|
||||
let ns = Namespace::new().subspace(&format!("ram{id}"));
|
||||
let ns = Namespace::new().subspace(format!("ram{id}"));
|
||||
let f_s = Sort::Field(f.clone());
|
||||
let v_s = ram.val_sort.clone();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user