Skip to content

Commit

Permalink
chore: Clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelburnham committed Aug 12, 2024
1 parent 2f19ecf commit a46fc0b
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 13 deletions.
File renamed without changes.
10 changes: 4 additions & 6 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ concurrency:

jobs:
test:
runs-on: gh-32vcpu-128gbram-ubuntu-2204
runs-on: warp-ubuntu-2404-x64-32x
strategy:
fail-fast: false
env:
Expand Down Expand Up @@ -65,12 +65,10 @@ jobs:
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
# See '.cargo/config' for list of enabled/disabled clippy lints
# See '.cargo/config.toml' for list of enabled/disabled clippy lints
- name: rustfmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all --check
run: |
cargo fmt --all --check
- name: cargo clippy
run: cargo xclippy -D warnings

Expand Down
2 changes: 1 addition & 1 deletion crates/bls12381/src/curves/g1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,7 @@ mod tests {
fn test_random_mul_by_seed_square() {
let mut rng = rand::thread_rng();
let a = G1Projective::random(&mut rng);
let x0 = bls12_381::Scalar::from(15132376222941642752);
let x0 = Scalar::from(15132376222941642752);
let c = a * (x0 * x0);
let a = G1Affine::from(a);
let c = G1Affine::from(c);
Expand Down
2 changes: 1 addition & 1 deletion crates/bls12381/src/curves/g2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -985,7 +985,7 @@ mod tests {
fn test_random_mul_by_seed() {
let mut rng = rand::thread_rng();
let a = G2Projective::random(&mut rng);
let x0 = bls12_381::Scalar::from(15132376222941642752);
let x0 = Scalar::from(15132376222941642752);
let c = a * x0;
let c = -c;
let a = G2Affine::from(a);
Expand Down
6 changes: 3 additions & 3 deletions crates/chunk/tests/gadget.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ impl<F: PrimeField> ChunkStepCircuit<F> for ChunkStep<F> {

// NIVC `StepCircuit`` implementation
#[derive(Clone, Debug)]
struct FoldStepWrapper<F: PrimeField, C: ChunkStepCircuit<F>, const N: usize> {
pub struct FoldStepWrapper<F: PrimeField, C: ChunkStepCircuit<F>, const N: usize> {
inner: FoldStep<F, C, N>,
}

Expand Down Expand Up @@ -77,12 +77,12 @@ impl<F: PrimeField, C: ChunkStepCircuit<F>, const N: usize> StepCircuit<F>
}

// NIVC `NonUniformCircuit` implementation
struct ChunkCircuit<F: PrimeField, C: ChunkStepCircuit<F>, const N: usize> {
pub struct ChunkCircuit<F: PrimeField, C: ChunkStepCircuit<F>, const N: usize> {
inner: InnerCircuit<F, C, N>,
}

#[derive(Clone, Debug)]
enum ChunkCircuitSet<F: PrimeField, C: ChunkStepCircuit<F>, const N: usize> {
pub enum ChunkCircuitSet<F: PrimeField, C: ChunkStepCircuit<F>, const N: usize> {
IterStep(FoldStepWrapper<F, C, N>),
}

Expand Down
1 change: 1 addition & 0 deletions crates/merkle-inclusion/tests/gadget.rs
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ impl SimpleMerkleTree {
/// The path key is a vector of `Boolean` values, where each value indicates a direction at a node:
/// - `Boolean::constant(false)` for a left turn.
/// - `Boolean::constant(true)` for a right turn.
///
/// The path keys are long as specified by the referred Digest output size bits long, padded with `false` values.
///
/// # Tree Structure
Expand Down
2 changes: 1 addition & 1 deletion crates/ripemd160/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# bellpepper-ripemd160
A [bellpepper](https://github.com/lurk-lab/bellpepper) gadget for the RIPEMD-160 hash function
A [bellpepper](https://github.com/argumentcomputer/bellpepper) gadget for the RIPEMD-160 hash function

## License

Expand Down
2 changes: 1 addition & 1 deletion crates/uint64/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ impl UInt64 {

// Compute the maximum value of the sum so we allocate enough bits for
// the result
let mut max_value = (operands.len() as u128) * (u128::from(u64::max_value()));
let mut max_value = (operands.len() as u128) * (u128::from(u64::MAX));

// Keep track of the resulting value
let mut result_value = Some(0u128);
Expand Down

0 comments on commit a46fc0b

Please sign in to comment.