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

Allow dynamically sized types in tokio_util::io::poll_read_buf #6441

Merged
merged 2 commits into from
Mar 30, 2024

Conversation

tglane
Copy link
Contributor

@tglane tglane commented Mar 29, 2024

Motivation

This PR should fix the issue #6429

Solution

I added ?Sized to the trait bounds of the io parameter of tokio_util::io::poll_read_buf to allow dynamically sized parameters like &mut (dyn tokio::io::AsyncRead + Unpin) as well.

Closes #6429

Copy link
Member

@taiki-e taiki-e left a comment

Choose a reason for hiding this comment

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

Thanks.

@taiki-e taiki-e added the A-tokio-util Area: The tokio-util crate label Mar 29, 2024
@Darksonn
Copy link
Contributor

What about poll_write_buf?

@tglane
Copy link
Contributor Author

tglane commented Mar 30, 2024

What about poll_write_buf?

Yeah it would only be consistent to add the trait bound to poll_write_buf as well.

Edit.: Added it in this commit.

Copy link
Contributor

@Darksonn Darksonn left a comment

Choose a reason for hiding this comment

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

Thanks.

@Darksonn Darksonn enabled auto-merge (squash) March 30, 2024 12:02
@Darksonn Darksonn merged commit 1fcb77d into tokio-rs:master Mar 30, 2024
75 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio-util Area: The tokio-util crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tokio_util::io::poll_read_buf does not work with ?Sized type.
3 participants