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

hybrid-array: use From for Array<->[T; N] reference conversions #1026

Merged
merged 1 commit into from
Dec 31, 2023

Conversation

tarcieri
Copy link
Member

...instead of AsRef/AsMut, which allows inference to work for those traits.

Notably [T; N] doesn't impl AsRef/AsMut for itself, only for slices, so this is more consistent.

...instead of `AsRef`/`AsMut`, which allows inference to work for those
traits.

Notably `[T; N]` doesn't impl `AsRef`/`AsMut` for itself, only for
slices, so this is more consistent.
@tarcieri tarcieri merged commit 404a67e into master Dec 31, 2023
11 checks passed
@tarcieri tarcieri deleted the hybrid-array/use-from-for-reference-conversions branch December 31, 2023 03:28
tarcieri added a commit that referenced this pull request Dec 31, 2023
These were removed in #1026 for more consistency with core arrays.

However, `generic-array` provides these impls, which makes removing them
problematic when migrating `generic-array`-based code, so it's easier to
keep them around, even if it breaks inference due to overlapping impls.
tarcieri added a commit that referenced this pull request Dec 31, 2023
These were removed in #1026 for more consistency with core arrays.

However, `generic-array` provides these impls, which makes removing them
problematic when migrating `generic-array`-based code, so it's easier to
keep them around, even if it breaks inference due to overlapping impls.
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.

None yet

1 participant