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

Set EnvOpenOptions::open() to unsafe #246

Merged
merged 5 commits into from
Mar 4, 2024
Merged

Conversation

hinto-janai
Copy link
Contributor

Closes #207.

  • fn EnvOpenOptions::open() -> unsafe fn EnvOpenOptions::open()
  • Adds # Safety documentation
  • Fixes all callers to use unsafe

heed can actually uphold some of the safety invariants, but for now they are documented so at least users are aware of them.

Unrelated change: the new Env::set_flags (#245) doesn't necessarily gain safety from &mut self, so it is changed to &self.

@hinto-janai hinto-janai requested a review from Kerollmops March 3, 2024 19:33
Copy link
Member

@Kerollmops Kerollmops left a comment

Choose a reason for hiding this comment

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

Thank you very much for the changes! Merging!

@Kerollmops Kerollmops added this to the v0.20.0 milestone Mar 4, 2024
@Kerollmops Kerollmops added breaking A change that is breaking the semver security Something that is security related documentation Improvements or additions to documentation labels Mar 4, 2024
@Kerollmops Kerollmops merged commit 029a25b into meilisearch:main Mar 4, 2024
8 checks passed
@hinto-janai hinto-janai deleted the open branch March 4, 2024 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking A change that is breaking the semver documentation Improvements or additions to documentation security Something that is security related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Opening an Env must be unsafe
2 participants