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

lmdb::dbi::open should take a string_view #5

Closed
deepbluev7 opened this issue Mar 2, 2021 · 2 comments
Closed

lmdb::dbi::open should take a string_view #5

deepbluev7 opened this issue Mar 2, 2021 · 2 comments

Comments

@deepbluev7
Copy link

If you store the names of sub dbs in a db, you need to first convert them to a std::string and then call c_str() on it, to be able to pass it safely to dbi::open. Imo it should be possible to pass the string_view directly.

This is a small UX fix, otherwise I really enjoy using this library, thank you for maintaining it!

@hoytech hoytech closed this as completed in bd08913 Mar 2, 2021
@hoytech
Copy link
Owner

hoytech commented Mar 2, 2021

Good idea, thank you for requesting it! I just pushed a commit that I think should do what you want. Let me know if not 👍

@deepbluev7
Copy link
Author

Wow, awesome, thank you! That was super quick!

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