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

Add an opt-in trait for "unstable" raw entries #300

Merged
merged 4 commits into from
Jan 28, 2024

Conversation

cuviper
Copy link
Member

@cuviper cuviper commented Jan 24, 2024

We usually wait for the standard library to stabilize APIs so we can match them as much as possible, but the future of raw entries in rust-lang/rust#56167 is uncertain. For folks who really want it now, this PR offers an opt-in trait RawEntryApiV1 without polluting our inherent method namespace.

The V1 suffix is basically representing a snapshot of what std currently has, as of Rust 1.75. If they later change in compatible ways, we can extend ours to keep up, or else we can consider a V2. If std finally stabilizes a raw entry API, we will match that in our inherent methods, without an intermediate trait. We won't be able to remove the old traits without a semver breaking change, but they can at least be #[deprecated].

Resolves #166.

@cuviper cuviper added this pull request to the merge queue Jan 28, 2024
Merged via the queue into indexmap-rs:master with commit 9edb1a4 Jan 28, 2024
15 checks passed
@cuviper cuviper deleted the raw_entry_v1 branch January 28, 2024 00:27
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

Successfully merging this pull request may close these issues.

Expose RawEntry API
1 participant