fix: satisfy cargo fmt and clippy in the Rust crates - #5
Merged
Conversation
CI caught formatting I never ran. I formatted the Go and TypeScript
changes but not the Rust, so two lines I wrote in Phase 0.3 exceeded
rustfmt's width and failed `cargo fmt --all --check` in both the circuits
and contracts workflows.
Running the full gate set locally then surfaced two real problems that
`cargo test --test pool_circuits` alone never showed:
- a SpendCircuit::new call site inside src/pool/ffi.rs was still
passing 13 arguments. It lives in an inline #[cfg(test)] module, so
only `clippy --all-targets` (or `cargo test --lib`) compiles it.
- spend_proof_from_the_ffi_path_verifies built a 15-element public
input list and asserted len() == 15, so it failed with
MalformedVerifyingKey against the now-17-IC key. That test is the one
asserting a phone's proof will be accepted on-chain, so it is worth
keeping honest: it now supplies min_kyc_level explicitly rather than
letting serde's default fill it, which would have passed while
testing a different statement.
Every gate in every workflow now passes locally: circuits (fmt, test),
contracts (fmt, clippy -D warnings, test, wasm build), backend (vet,
build, test), shared (typecheck, build), mobile (typecheck, lint,
format:check).
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CI caught formatting I never ran. I formatted the Go and TypeScript changes but not the Rust, so two lines I wrote in Phase 0.3 exceeded rustfmt's width and failed
cargo fmt --all --checkin both the circuits and contracts workflows.Running the full gate set locally then surfaced two real problems that
cargo test --test pool_circuitsalone never showed:a SpendCircuit::new call site inside src/pool/ffi.rs was still passing 13 arguments. It lives in an inline #[cfg(test)] module, so only
clippy --all-targets(orcargo test --lib) compiles it.spend_proof_from_the_ffi_path_verifies built a 15-element public input list and asserted len() == 15, so it failed with MalformedVerifyingKey against the now-17-IC key. That test is the one asserting a phone's proof will be accepted on-chain, so it is worth keeping honest: it now supplies min_kyc_level explicitly rather than letting serde's default fill it, which would have passed while testing a different statement.
Every gate in every workflow now passes locally: circuits (fmt, test), contracts (fmt, clippy -D warnings, test, wasm build), backend (vet, build, test), shared (typecheck, build), mobile (typecheck, lint, format:check).