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 Slice::new and new_mut for empty slices #278

Merged
merged 1 commit into from
Oct 27, 2023

Conversation

cuviper
Copy link
Member

@cuviper cuviper commented Oct 4, 2023

  • pub const fn map::Slice::new<'a>() -> &'a Self
  • pub fn map::Slice::new_mut<'a>() -> &'a mut Self
  • pub const fn set::Slice::new<'a>() -> &'a Self

In addition, the existing len and is_empty are now const fn.

* `pub const fn map::Slice::new<'a>() -> &'a Self`
* `pub fn map::Slice::new_mut<'a>() -> &'a mut Self`
* `pub const fn set::Slice::new<'a>() -> &'a Self`

In addition, the existing `len` and `is_empty` are now `const fn`.
@cuviper cuviper merged commit 0d5ee80 into indexmap-rs:master Oct 27, 2023
14 checks passed
@cuviper cuviper deleted the slice-new branch October 31, 2023 20:10
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.

1 participant