Conversation
…rate assignments in method body
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the codebase to support enums and tuple structs by reorganizing core implementations, improving the APIs used for reading and writing, and updating field handling to better support non-standard struct layouts. Key changes include:
- Refactoring field-related functions to accept &syn::Member instead of &syn::Ident.
- Updating module visibility and renaming receiver types in the derive implementations.
- Cleaning up legacy code and reorganizing helper functions for improved maintainability.
Reviewed Changes
Copilot reviewed 32 out of 32 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| impl/src/model_types.rs | Updated field parameter types and removed legacy assignment generation code to improve tuple struct support. |
| impl/src/lib.rs | Exposed the syn_helpers module as pub(crate) and updated derive dispatch logic for receiver types. |
| impl/src/code_gen/* | Reorganized generation logic into dedicated read and write modules and updated receiver types for enums and structs. |
| Notes.md | Updated design notes documenting attribute precedence and reordering logic for ParselyRead. |
Comments suppressed due to low confidence (3)
impl/src/model_types.rs:242
- Changing the field parameter from &syn::Ident to &syn::Member improves support for tuple struct fields, but please ensure consistent usage and clear documentation across the codebase.
pub(crate) fn to_read_map_tokens(&self, field_name: &syn::Member, tokens: &mut TokenStream) {
impl/src/lib.rs:6
- Exposing the 'syn_helpers' module as pub(crate) increases its visibility; please verify that this change aligns with the intended encapsulation boundaries of the project.
pub(crate) mod syn_helpers;
impl/src/model_types.rs:22
- [nitpick] The removal of the custom assignment generation method from TypedFnArgList simplifies the type's interface; please confirm that any necessary specialized assignment logic is now handled appropriately in a different location.
// Removed assignment generation method
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.
Lots here, including some major code reorganization. Main bulk of the changes are to support enums and tuple structs.