-
Notifications
You must be signed in to change notification settings - Fork 52
fix: Rust 1.89 clippy warnings
#2665
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
Conversation
* mithril-dmq from `0.1.6` to `0.1.7` * mithril-persistence from `0.2.57` to `0.2.58` * mithril-aggregator from `0.7.78` to `0.7.79` * mithril-client-cli from `0.12.24` to `0.12.25` * mithril-client from `0.12.25` to `0.12.26` * mithril-common from `0.6.13` to `0.6.14` * mithril-stm from `0.4.10` to `0.4.11` * mithril-end-to-end from `0.4.98` to `0.4.99`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR addresses Rust 1.89 clippy warnings across multiple Mithril project crates. The changes primarily focus on modernizing Rust syntax and improving code quality according to newer clippy lints.
Key changes include:
- Using
std::slice::from_ref()instead of creating single-element slices - Adopting
let-elsechains to reduce nested if statements - Adding explicit lifetime annotations where needed
Reviewed Changes
Copilot reviewed 33 out of 34 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| mithril-test-lab/mithril-end-to-end/src/stress_test/fake_signer.rs | Replace slice creation with std::slice::from_ref() |
| mithril-stm/README.md | Remove redundant function wrapper in documentation example |
| mithril-common/src/crypto_helper/merkle_map.rs | Refactor nested if statements using let-else chains |
| mithril-common/src/certificate_chain/certificate_verifier.rs | Simplify conditional logic with let-else pattern |
| mithril-client/src/file_downloader/http.rs | Fix type coercion for feedback receiver |
| mithril-client/src/feedback.rs | Fix type coercion for feedback receiver |
| mithril-client/src/certificate_client/verify.rs | Refactor nested if statements using let-else chains |
| mithril-client-cli/src/utils/feedback_receiver.rs | Fix type coercion for feedback receiver |
| mithril-client-cli/src/utils/archive_unpacker/zip_unpacker.rs | Refactor nested if statements using let-else chains |
| mithril-aggregator/tests/prove_transactions.rs | Replace slice creation with std::slice::from_ref() |
| mithril-aggregator/src/tools/file_archiver/appender.rs | Add #[cfg(test)] attributes to test-only code |
| mithril-aggregator/src/tools/file_archiver/api.rs | Refactor nested if statements using let-else chains |
| mithril-aggregator/src/store/epoch_settings_storer.rs | Add #[cfg(test)] attributes to test-only code |
| mithril-aggregator/src/services/stake_distribution.rs | Add explicit lifetime annotation |
| mithril-aggregator/src/services/message.rs | Replace slice creation with std::slice::from_ref() |
| mithril-aggregator/src/services/certifier/buffered_certifier.rs | Refactor nested if statements using let-else chains |
| mithril-aggregator/src/services/aggregator_client.rs | Remove unused test code |
| mithril-aggregator/src/http_server/validators/prover_transactions_hash_validator.rs | Replace slice creation with std::slice::from_ref() |
| mithril-aggregator/src/file_uploaders/cloud_uploader/api.rs | Refactor nested if statements using let-else chains |
| mithril-aggregator/src/dependency_injection/builder/support/sqlite.rs | Refactor nested if statements using let-else chains |
| internal/mithril-persistence/src/sqlite/connection_pool.rs | Add explicit lifetime annotation |
| internal/mithril-persistence/src/sqlite/connection_extensions.rs | Add explicit lifetime annotations |
| internal/mithril-persistence/src/database/version_checker.rs | Add explicit lifetime annotation |
| internal/mithril-dmq/src/consumer/pallas.rs | Add explicit lifetime annotation |
| Various Cargo.toml files | Version bumps across multiple crates |
Content
This PR includes fixes to the new clippy warnings appeared with the release of Rust
1.89.Pre-submit checklist