Skip to content

Commit

Permalink
Fix additional clippy issues
Browse files Browse the repository at this point in the history
  • Loading branch information
phamnhatminh1292001 committed Aug 12, 2024
1 parent 096a9e5 commit 0dd76bc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion zkmemory/src/commitment/kzg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ mod test {
let fr = Fr::from_bytes(&chunk).expect("Unable to convert to Fr");

// Convert back from Fr to bytes
let chunk_fr: [u8; 32] = fr.try_into().expect("Cannot convert from Fr to bytes");
let chunk_fr: [u8; 32] = fr.into();

assert_eq!(chunk_fr, chunk);
}
Expand Down
8 changes: 4 additions & 4 deletions zkmemory/src/nova/testcases.rs
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ mod test {
],
&[<E2 as Engine>::Scalar::ZERO],
);
assert_ne!(res.is_ok(), true);
assert!(!res.is_ok());

Check failure on line 238 in zkmemory/src/nova/testcases.rs

View workflow job for this annotation

GitHub Actions / Clippy

this boolean expression can be simplified

error: this boolean expression can be simplified --> zkmemory/src/nova/testcases.rs:238:17 | 238 | assert!(!res.is_ok()); | ^^^^^^^^^^^^ help: try: `res.is_err()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool note: the lint level is defined here --> zkmemory/src/lib.rs:6:5 | 6 | warnings, | ^^^^^^^^ = note: `#[deny(clippy::nonminimal_bool)]` implied by `#[deny(warnings)]`
}

#[test]
Expand Down Expand Up @@ -298,7 +298,7 @@ mod test {
],
&[<E2 as Engine>::Scalar::ZERO],
);
assert_ne!(res.is_ok(), true);
assert!(!res.is_ok());

Check failure on line 301 in zkmemory/src/nova/testcases.rs

View workflow job for this annotation

GitHub Actions / Clippy

this boolean expression can be simplified

error: this boolean expression can be simplified --> zkmemory/src/nova/testcases.rs:301:17 | 301 | assert!(!res.is_ok()); | ^^^^^^^^^^^^ help: try: `res.is_err()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool
}

// test memory consistency in two steps
Expand Down Expand Up @@ -361,7 +361,7 @@ mod test {
],
&[<E2 as Engine>::Scalar::ZERO],
);
assert_ne!(res.is_ok(), true);
assert!(!res.is_ok());

Check failure on line 364 in zkmemory/src/nova/testcases.rs

View workflow job for this annotation

GitHub Actions / Clippy

this boolean expression can be simplified

error: this boolean expression can be simplified --> zkmemory/src/nova/testcases.rs:364:17 | 364 | assert!(!res.is_ok()); | ^^^^^^^^^^^^ help: try: `res.is_err()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool
}

#[test]
Expand Down Expand Up @@ -424,7 +424,7 @@ mod test {
],
&[<E2 as Engine>::Scalar::ZERO],
);
assert_ne!(res.is_ok(), true);
assert!(!res.is_ok());

Check failure on line 427 in zkmemory/src/nova/testcases.rs

View workflow job for this annotation

GitHub Actions / Clippy

this boolean expression can be simplified

error: this boolean expression can be simplified --> zkmemory/src/nova/testcases.rs:427:17 | 427 | assert!(!res.is_ok()); | ^^^^^^^^^^^^ help: try: `res.is_err()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool
}

#[test]
Expand Down

0 comments on commit 0dd76bc

Please sign in to comment.