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

Ptr::try_cast_into takes explicit element count #1160

Merged
merged 1 commit into from
May 10, 2024
Merged

Ptr::try_cast_into takes explicit element count #1160

merged 1 commit into from
May 10, 2024

Conversation

joshlf
Copy link
Member

@joshlf joshlf commented May 1, 2024

No description provided.

@joshlf joshlf changed the base branch from main to ptr-split May 3, 2024 04:11
@joshlf joshlf force-pushed the zst-count branch 2 times, most recently from 0c4e84d to 5769517 Compare May 3, 2024 04:29
@joshlf joshlf force-pushed the ptr-split branch 6 times, most recently from 0736e85 to 447fee9 Compare May 7, 2024 13:59
Base automatically changed from ptr-split to main May 7, 2024 14:15
@joshlf joshlf requested a review from jswrenn May 7, 2024 15:13
src/lib.rs Outdated Show resolved Hide resolved
src/lib.rs Show resolved Hide resolved
src/lib.rs Show resolved Hide resolved
src/pointer/ptr.rs Outdated Show resolved Hide resolved
src/pointer/ptr.rs Outdated Show resolved Hide resolved
@joshlf joshlf force-pushed the zst-count branch 2 times, most recently from acbfd9d to b86a264 Compare May 10, 2024 17:14
@jswrenn jswrenn force-pushed the zst-count branch 2 times, most recently from 916e2bf to 666fd3a Compare May 10, 2024 18:32
@joshlf joshlf force-pushed the zst-count branch 2 times, most recently from 63fab2e to da6aee6 Compare May 10, 2024 19:05
@joshlf joshlf changed the title [WIP] Support ZST DSTs with counts Ptr::try_cast_into takes explicit element count May 10, 2024
This permits us use `Ptr::try_cast_into` directly (rather than using
`Ref`) in `FromBytes` methods that take an explicit element count. This,
in turn, allows those methods to support DSTs with zero-sized trailing
slice elements.

Makes progress on #29
@joshlf joshlf marked this pull request as ready for review May 10, 2024 19:23
@joshlf joshlf requested a review from jswrenn May 10, 2024 19:23
@joshlf joshlf enabled auto-merge May 10, 2024 19:23
@joshlf joshlf added this pull request to the merge queue May 10, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks May 10, 2024
@joshlf joshlf added this pull request to the merge queue May 10, 2024
Merged via the queue into main with commit f8057e9 May 10, 2024
210 checks passed
@joshlf joshlf deleted the zst-count branch May 10, 2024 20:25
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.

2 participants