Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR enables the clippy::pedantic linter level for the Rust codebase and addresses all resulting warnings through a combination of refactoring, simplifications, and properly documented allow attributes.
Changes:
- Enabled
clippy::pedanticandclippy::allow_attributes_without_reasonin main.rs - Extracted large validator functions into a new
jolt_validatorsmodule to reduce complexity - Refactored WebSocket stream state machine by extracting enum variants into separate structs
- Extracted large methods in
net_actor.rsinto smaller, focused functions - Added
reasonparameters to all#[allow(...)]attributes throughout the codebase - Applied clippy suggestions (simplified matches, if-let-else, map_or, etc.)
- Made visibility changes to support the new module structure
Reviewed changes
Copilot reviewed 29 out of 29 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| boltstub_rs/src/main.rs | Enabled pedantic clippy lints with allow for match_same_arms |
| boltstub_rs/src/parser.rs | Major refactoring: extracted functions and moved validators to new module |
| boltstub_rs/src/parser/jolt_validators.rs | New module containing validation logic extracted from parser.rs |
| boltstub_rs/src/web_socket_stream.rs | Refactored state machine enums into separate structs with extracted methods |
| boltstub_rs/src/values/pack_stream_value.rs | Added allow reasons and applied clippy simplifications |
| boltstub_rs/src/net_actor.rs | Extracted large methods into focused helper functions |
| boltstub_rs/src/bolt_version.rs | Changed message_auto_response return type from Option<Resolvable> to Resolvable |
| boltstub_rs/src/values/bolt_struct/*.rs | Various clippy fixes and test code cleanup |
| boltstub_rs/src/net*.rs | Simplified conditionals and added allow reasons |
| Multiple other files | Minor clippy fixes, allow reasons, and simplifications |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Closes: DRIVERS-256