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

Possible enhancement? Adding HashMap::entry like methods #28

Open
zelenij opened this issue Jul 8, 2023 · 0 comments
Open

Possible enhancement? Adding HashMap::entry like methods #28

zelenij opened this issue Jul 8, 2023 · 0 comments

Comments

@zelenij
Copy link

zelenij commented Jul 8, 2023

Is it possible to enhance the generated code, so that it also produces methods like entry in HashMap? This is to work around the issue as in this SO post:

https://stackoverflow.com/questions/36603867/how-to-workaround-rusts-borrow-check-of-hashmap

So if the original struct has a hashed field id, then the macro would generate both get_by_id and entry_by_id.

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

When branches are created from issues, their pull requests are automatically linked.

1 participant