Skip to content

Commit

Permalink
lint (#181)
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-ozdemir authored Dec 13, 2023
1 parent 697c240 commit 6133414
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions src/ir/opt/cfold.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::*;
Expand Down Expand Up @@ -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),
}
}
2 changes: 1 addition & 1 deletion src/ir/opt/mem/ram/checker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit 6133414

Please sign in to comment.