Skip to content

Commit

Permalink
fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
smtmfft committed Oct 22, 2023
1 parent ec2ddcb commit 6172245
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion halo2_proofs/src/plonk/evaluation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1253,15 +1253,17 @@ pub fn evaluate<F: Field, B: Basis>(
mod test {
use halo2curves::{secp256k1::Secp256k1Affine, CurveAffine};

#[cfg(debug_assertions)]
#[test]
#[should_panic(expected = "attempt to subtract with overflow")]
fn compute_cluster_idx_underflow() {
let degree = 0;
let degree = 0u32;
let idx = (31 - (degree as u32).leading_zeros()) as usize;

Check failure on line 1261 in halo2_proofs/src/plonk/evaluation.rs

View workflow job for this annotation

GitHub Actions / Clippy (1.56.1)

casting to the same type is unnecessary (`u32` -> `u32`)

error: casting to the same type is unnecessary (`u32` -> `u32`) --> halo2_proofs/src/plonk/evaluation.rs:1261:25 | 1261 | let idx = (31 - (degree as u32).leading_zeros()) as usize; | ^^^^^^^^^^^^^^^ help: try: `degree` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast = note: `-D clippy::unnecessary-cast` implied by `-D warnings`

Check warning on line 1261 in halo2_proofs/src/plonk/evaluation.rs

View workflow job for this annotation

GitHub Actions / Clippy (beta)

casting to the same type is unnecessary (`u32` -> `u32`)

warning: casting to the same type is unnecessary (`u32` -> `u32`) --> halo2_proofs/src/plonk/evaluation.rs:1261:25 | 1261 | let idx = (31 - (degree as u32).leading_zeros()) as usize; | ^^^^^^^^^^^^^^^ help: try: `degree` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast = note: `-W clippy::unnecessary-cast` implied by `-W clippy::all`
println!("idx = {}", idx);
}

#[test]
#[ignore]
fn compute_cluster_idx_new() {
for degree in 0..17usize {
let idx = super::Evaluator::<Secp256k1Affine>::compute_cluster_idx(degree, 10);
Expand Down

0 comments on commit 6172245

Please sign in to comment.