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

Support testing TryFromBytes for !NoCell types #924

Merged
merged 1 commit into from
Feb 22, 2024

Conversation

joshlf
Copy link
Member

@joshlf joshlf commented Feb 22, 2024

Previously, our test harness for TryFromBytes types assumed that those types also implemented NoCell. This commit introduces machinery that allows us to conditionally execute certain steps of our tests depending on whether or not the type under test implements NoCell.

This commit also lifts the T: NoCell bound in TryFromBytes for MaybeUninit<T> in order to test this machinery.

@joshlf joshlf requested a review from jswrenn February 22, 2024 16:09
@joshlf joshlf force-pushed the maybe-uninit-no-cell-try-from-bytes branch from eb3782d to 8e63e62 Compare February 22, 2024 16:10
jswrenn
jswrenn previously approved these changes Feb 22, 2024
Copy link
Collaborator

@jswrenn jswrenn left a comment

Choose a reason for hiding this comment

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

Well, I can't say I approve of this in the moral sense, but I will approve it. 😅

@joshlf joshlf force-pushed the maybe-uninit-no-cell-try-from-bytes branch 6 times, most recently from cac564a to 1ec42ba Compare February 22, 2024 18:48
Previously, our test harness for `TryFromBytes` types assumed that those
types also implemented `NoCell`. This commit introduces machinery that
allows us to conditionally execute certain steps of our tests depending
on whether or not the type under test implements `NoCell`.

This commit also lifts the `T: NoCell` bound in `TryFromBytes for
MaybeUninit<T>` in order to test this machinery.

Makes progress on #5

Co-authored-by: Jack Wrenn <jswrenn@amazon.com>
@joshlf joshlf force-pushed the maybe-uninit-no-cell-try-from-bytes branch from 1ec42ba to e872051 Compare February 22, 2024 18:56
@joshlf joshlf added this pull request to the merge queue Feb 22, 2024
Merged via the queue into main with commit ca49473 Feb 22, 2024
210 checks passed
@joshlf joshlf deleted the maybe-uninit-no-cell-try-from-bytes branch February 22, 2024 19:09
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

2 participants