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

Enable serializeHierarchy for tuple structs #797

Closed

Conversation

tuxbotix
Copy link
Contributor

@tuxbotix tuxbotix commented Apr 7, 2024

Introduced Changes

Give the ability to handle Tuple Structs.

  • a.b.c.0 will address the first value of a tuple struct under name c.
  • This is the simplest implementation without changing many other functions that handle the identifier names, etc in the derive.

Related:

Fixes #147

ToDo / Known Issues

  • This implementation could be improved with a match expression handling NamedFields and UnNamedFields separately to avoid the enumerate() for all cases.
  • There is some repeated code with the quote usage. Would be nice to clear them out!
  • More tests

Ideas for Next Iterations (Not This PR)

How to Test

  • Tuple structs should be able to derive SerializeHierarchy

@tuxbotix tuxbotix enabled auto-merge April 7, 2024 09:50
@tuxbotix tuxbotix changed the title Simpler approach to enable serializeHierarchy for tuple structs Draft: Simpler approach to enable serializeHierarchy for tuple structs Apr 7, 2024
@tuxbotix tuxbotix disabled auto-merge April 7, 2024 09:52
@tuxbotix tuxbotix marked this pull request as draft April 7, 2024 09:52
@tuxbotix tuxbotix changed the title Draft: Simpler approach to enable serializeHierarchy for tuple structs Simpler approach to enable serializeHierarchy for tuple structs Apr 7, 2024
@tuxbotix tuxbotix force-pushed the serialize_hierarchy_for_tuple_structs branch from dd10343 to 1d2e711 Compare April 7, 2024 10:59
@tuxbotix tuxbotix changed the title Simpler approach to enable serializeHierarchy for tuple structs Enable serializeHierarchy for tuple structs Apr 7, 2024
@tuxbotix tuxbotix force-pushed the serialize_hierarchy_for_tuple_structs branch from 921838a to a75a08c Compare April 7, 2024 11:24
@tuxbotix tuxbotix marked this pull request as ready for review April 7, 2024 11:24
@tuxbotix tuxbotix enabled auto-merge April 7, 2024 11:24
@schmidma
Copy link
Member

schmidma commented May 5, 2024

superseded by #987

@schmidma schmidma closed this May 5, 2024
auto-merge was automatically disabled May 5, 2024 18:37

Pull request was closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Improve type TwoLineSegments
2 participants