Skip to content

Addition of rustfmt run over generated test vectors.#112

Closed
vivek-arte wants to merge 2 commits into
zcash:masterfrom
QED-it:formatting_updates_1
Closed

Addition of rustfmt run over generated test vectors.#112
vivek-arte wants to merge 2 commits into
zcash:masterfrom
QED-it:formatting_updates_1

Conversation

@vivek-arte
Copy link
Copy Markdown
Contributor

This PR adds a step to run rustfmt over the generated Rust test vectors.

This allows the vectors to be copied directly to where they are used (in other repositories) with minimal post copy work.

This was suggested to be separated out of #108 in #108 (comment).

Copy link
Copy Markdown
Contributor

@oxarbitrage oxarbitrage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified that running rustfmt --edition 2021 test-vectors/rust/*.rs on the master branch files produces the output in this PR. Addition of the command to regenrate.sh looks good so rust test vectors are consistently formatted for direct use in other repositories. Approving, i think we should merge.

oxarbitrage
oxarbitrage previously approved these changes Feb 26, 2026
@oxarbitrage
Copy link
Copy Markdown
Contributor

Need rebase now that we have #114 merged.
Thanks @vivek-arte

@vivek-arte
Copy link
Copy Markdown
Contributor Author

@oxarbitrage I rebased, and the CI passes on the local PR (QED-it#41).

@daira
Copy link
Copy Markdown
Contributor

daira commented Apr 4, 2026

This change is no longer needed — PR #122 (merged to master) already runs rustfmt on each generated Rust file via pipe in regenerate.sh:

uv run $generator -t $gen_type | rustfmt >test-vectors/$gen_type/$generator.$extension

This achieves the same effect of ensuring all generated Rust test vectors are formatted.

🤖 Comment written with Claude Code

@daira
Copy link
Copy Markdown
Contributor

daira commented Apr 4, 2026

Closing per above comment. I will add --edition 2021 in #119.

@daira daira closed this Apr 4, 2026
daira added a commit that referenced this pull request Apr 4, 2026
As suggested by @vivek-arte in #112. This does not change the
output with the current version of rustfmt but is good practice
for forward compatibility.

Co-Authored-By: Vivek Arte <46618816+vivek-arte@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants