-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Remove FutureExt::boxed
to unify project style
#1923
Conversation
b079c99
to
21d44e3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
futures_util::pin_mut!
is a safe solution for this.
src/server/tcp.rs
Outdated
loop { | ||
match accept_fut.poll_unpin(cx) { | ||
match unsafe { Pin::new_unchecked(&mut accept) }.poll(cx) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let accept = self.listener.accept();
futures_util::pin_mut!(accept);
loop {
match accept.poll_unpin(cx) {
src/common/drain.rs
Outdated
|
||
match recv_fut.poll_unpin(cx) { | ||
let mut recv = me.watch.rx.recv_ref(); | ||
match unsafe { Pin::new_unchecked(&mut recv) }.poll(cx) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let recv = me.watch.rx.recv_ref();
futures_util::pin_mut!(recv);
match recv.poll_unpin(cx) {
21d44e3
to
f6e6177
Compare
replaced with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, nice catch!
introduced by #1890 while
Pin::new_unchecked
is used across this project which is more efficient