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

Make DataRequest.payload non-optional #5037

Merged
merged 3 commits into from
Jun 11, 2024

Conversation

robertbastian
Copy link
Member

Fixes #2956

Manishearth
Manishearth previously approved these changes Jun 11, 2024
Manishearth
Manishearth previously approved these changes Jun 11, 2024
@robertbastian robertbastian merged commit 90727cc into unicode-org:main Jun 11, 2024
28 checks passed
@robertbastian robertbastian deleted the payload branch June 11, 2024 21:21
Copy link
Member

@sffc sffc left a comment

Choose a reason for hiding this comment

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

Lgtm

Comment on lines +923 to +926
type Error = core::convert::Infallible;

fn try_from(response: DataResponse<M>) -> Result<Self, Self::Error> {
response.take_payload()
Ok(response.payload)
Copy link
Member

Choose a reason for hiding this comment

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

Thought: Just make this impl From

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll remove it, there's no point of a From that just accesses a field.

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.

Make DataResponse.payload be non-optional
3 participants