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 yielding !Unpin values. #50

Merged
merged 2 commits into from
Jan 20, 2021
Merged

Allow yielding !Unpin values. #50

merged 2 commits into from
Jan 20, 2021

Conversation

goffrie
Copy link
Contributor

@goffrie goffrie commented Jan 20, 2021

There is no need to require T: Unpin as the value being yielded is not behind a Pin.

I added a test with a sample usecase for this, but it's also helpful in generic contexts where yielded values aren't necessarily known to be Unpin (even though they are in practice).

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 merged commit 1c40a5b into tokio-rs:master Jan 20, 2021
@taiki-e taiki-e mentioned this pull request Jan 20, 2021
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