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

feat(core): replace field _pin with !Unpin as argument #2886

Merged

Conversation

morristai
Copy link
Member

@morristai morristai commented Aug 20, 2023

Description

We use PhantomPinned in ReadFuture to ensure that Unpin is not implemented, pin_project provides a concise usage with !Unpin as an argument. You can find more information here: https://docs.rs/pin_project/1.1.3/pin_project/attr.pin_project.html#unpin. This approach is equivalent to the current code, but I've found it to be more readable. If the maintainers do not consider it necessary, I will close this pull request.

Additional Notes

image

@morristai morristai requested a review from Xuanwo as a code owner August 20, 2023 16:08
@morristai morristai changed the title feat(core): replace field _pin with !Unpin as argument feat(core): replace field _pin with !Unpin as argument Aug 20, 2023
Copy link
Member

@Xuanwo Xuanwo left a comment

Choose a reason for hiding this comment

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

Thanks!

@Xuanwo Xuanwo merged commit c588676 into apache:main Aug 20, 2023
86 checks passed
@morristai morristai deleted the feat/replace_phantompinned_with_new_argument branch August 20, 2023 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants