Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix minor clippy warnings #38

Merged
merged 4 commits into from
Dec 13, 2023
Merged

Fix minor clippy warnings #38

merged 4 commits into from
Dec 13, 2023

Conversation

rillian
Copy link
Contributor

@rillian rillian commented Dec 7, 2023

Address clippy lints on the test code

  • Iterate over test vectors directly (instead of indexing)
  • Remove redundant use import
  • Remove redundant struct initializer label
  • Simplify an assertion

This addresses everything in cargo clippy --all-targets under rust 1.74.1, except for the unused function in benchmark.rs. Changes will conflict with similar fixes in #33.

Address a clippy warning by unpacking over the container elements
directly instead of using a range and index variable. This is more
idiomatic.
Use the more explicit `is_err` instead of negating `is_ok`.
Addresses a clippy lint.
Address a clippy warning. When the struct initialization value has
the same name as the member, it's idiomatic to omit the member label.
The base64 package is referred to by its full path, so the explict
`use` statement is redundant in contemporary rust compilers.

Addresses a clippy lint.
@evq evq merged commit 61efd6e into brave-intl:2-updates Dec 13, 2023
evq added a commit that referenced this pull request Jun 20, 2024
* Update deps, 2.0.0 release

* Fix minor clippy warnings (#38)

* Loop over test vectors directly

Address a clippy warning by unpacking over the container elements
directly instead of using a range and index variable. This is more
idiomatic.

* Simplify test assertion

Use the more explicit `is_err` instead of negating `is_ok`.
Addresses a clippy lint.

* Remove redundant struct label in test

Address a clippy warning. When the struct initialization value has
the same name as the member, it's idiomatic to omit the member label.

* Remove unnecessary base64 import

The base64 package is referred to by its full path, so the explict
`use` statement is redundant in contemporary rust compilers.

Addresses a clippy lint.

* Fix broken build status badge (#37)

The travis-ci.org service is no longer available. Link to the
github actions status badge and page instead.

* Update to criterion 0.5 (#36)

* Update to criterion 0.5

Use the latest release of the `criterion` benchmark framework,
v0.5.1 at the time of writing. No relevant api changes. This
aligns with more recent software releases so there's less
surprise and fewer old versions of things.

* Fix benchmark typo

Correct spelling of the "sign pre-tokens" benchmark.

* cargo fmt (#39)

---------

Co-authored-by: Ralph Giles <[email protected]>
Co-authored-by: Ralph Giles <[email protected]>
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.

2 participants