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

Provide a trait to enable dynamic collection of captures into a custom type #2

Open
whitfin opened this issue Apr 5, 2019 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@whitfin
Copy link
Owner

whitfin commented Apr 5, 2019

Currently all captures are Vec<(&str, (usize, usize))>. This is probably the most efficient way we can go by default, but it's not particularly friendly for those who need to then change this type into something else (e.g. HashMap<&str, String>. It would be better if we could go directly into that type at capture time.

This would avoid an unnecessary Vec allocation, and save a few cycles for the actual parsing. It is likely also easier for the developer to provide the trait implementation, rather than manually parsing out their values.

@whitfin whitfin added the enhancement New feature or request label Apr 5, 2019
@whitfin whitfin added this to the 0.2 milestone Apr 5, 2019
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

No branches or pull requests

1 participant