Remove FutureExt::boxed to unify project style#1923
Merged
Conversation
AtkinsChang
force-pushed
the
remove-boxed
branch
from
September 3, 2019 12:42
b079c99 to
21d44e3
Compare
taiki-e
reviewed
Sep 3, 2019
taiki-e
left a comment
Contributor
There was a problem hiding this comment.
futures_util::pin_mut! is a safe solution for this.
| let mut accept = self.listener.accept(); | ||
| loop { | ||
| match accept_fut.poll_unpin(cx) { | ||
| match unsafe { Pin::new_unchecked(&mut accept) }.poll(cx) { |
Contributor
There was a problem hiding this comment.
let accept = self.listener.accept();
futures_util::pin_mut!(accept);
loop {
match accept.poll_unpin(cx) {|
|
||
| match recv_fut.poll_unpin(cx) { | ||
| let mut recv = me.watch.rx.recv_ref(); | ||
| match unsafe { Pin::new_unchecked(&mut recv) }.poll(cx) { |
Contributor
There was a problem hiding this comment.
let recv = me.watch.rx.recv_ref();
futures_util::pin_mut!(recv);
match recv.poll_unpin(cx) {
AtkinsChang
force-pushed
the
remove-boxed
branch
from
September 3, 2019 16:04
21d44e3 to
f6e6177
Compare
Contributor
Author
|
replaced with |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
introduced by #1890 while
Pin::new_uncheckedis used across this project which is more efficient