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

Check if key in UstrMap without creating new ustr #42

Open
sharon8811 opened this issue Feb 5, 2024 · 1 comment
Open

Check if key in UstrMap without creating new ustr #42

sharon8811 opened this issue Feb 5, 2024 · 1 comment

Comments

@sharon8811
Copy link

We need a way to check if key is in the UstrMap without actually creating ustr,
think of a user input and i want to check if the search term is in the map i will need to keep this user input string in memory forever
If we had a way to check without creating the ustr in memory it would have been perfect

@orzogc
Copy link
Contributor

orzogc commented May 2, 2024

You could use the raw entry API from HashMap(use hashbrown::HashMap instead in stable Rust).

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

No branches or pull requests

2 participants