-
Notifications
You must be signed in to change notification settings - Fork 78
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
Refactor ParsedMethod, ParsedSignal and ParsedInheritedMethod #1054
Refactor ParsedMethod, ParsedSignal and ParsedInheritedMethod #1054
Conversation
BenFordTytherington
commented
Aug 29, 2024
- Refactor method and inherited method to have docs passthrough
- Group common functionality between these 3 similar structs
…ike ParsedSignal - ParsedSignal had a `docs: Vec<Attribute>` field, and it seemed appropriate to add this to method and inherited methods too Is this the intended use?
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1054 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 72 72
Lines 13009 13061 +52
=========================================
+ Hits 13009 13061 +52 ☔ View full report in Codecov by Sentry. |
…sedInheritedMethod Includes introducing a struct and associated functions for the common fields, combining the common logic for parsing those fields. Also adds methods to build those types from the InvokableFields struct
Is it useful to combine all these invokable types in |
….g. Function searches for non-inherited methods first
…to be refactored - They now implement an Invokable trait which can be extended to improve shared functionality - This allowed refactoring of method and signal lookup to use a common lookup function
b9fb0db
to
f499b9a
Compare
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.
The tests seem to not be up-to-date, but this is going in the right direction :)
- Moved MethodFields and its renamed method to method.rs - Updated the expected outputs - Refactor the lookup method to be generic, and remove the superfluous trait