Skip to content

Conversation

@AlexanderPortland
Copy link

Hi! I'm working with DatatypeBuilders, and it'd be really nice if you could construct a variant's fields with Vec<String, DatatypeAccessor> as well as the existing Vec<&str, DatatypeAccessor>. Requiring string slices can be more restrictive, and unnecessarily so when the variant function eventually just needs to call .to_string() on the slice anyways.

I do realize that this now requires type annotations when calling variant w/ no fields, which would make it a breaking change, so I'd appreciate feedback if you know of other ways to implement this which wouldn't break any existing code.

Copy link
Member

@toolCHAINZ toolCHAINZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution! This does look better to me. I have one suggestion that might be worth trying but otherwise it looks good!

@toolCHAINZ toolCHAINZ added the enhancement New feature or request label Nov 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants