Skip to content

fix(version) Fix compilation error with tokio master #1895

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

Closed
wants to merge 1 commit into from

Conversation

hadashiA
Copy link

@hadashiA hadashiA commented Aug 9, 2019

  • Use tokio new 0.2.0 alpha release.
  • Followed tokio breaking changes in 0.2.0-alpha.1.

ref: #1892

Followed tokio breaking changes in 0.2.0-alpha.1 and freeze that tokio alpha version.

Closes hyperium#1892
@@ -99,7 +100,9 @@ where
loop {
match mem::replace(&mut me.state, State::Draining) {
State::Watch(on_drain) => {
match me.watch.rx.poll_ref(cx) {
let mut future = me.watch.rx.recv_ref();
let mut pin = unsafe { Pin::new_unchecked(&mut future) };
Copy link
Contributor

Choose a reason for hiding this comment

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

#1890 does this without unsafe.

@@ -106,7 +108,10 @@ impl AddrIncoming {
self.timeout = None;

loop {
match Pin::new(&mut self.listener).poll_accept(cx) {
let mut future = self.listener.accept();
let mut pin = unsafe { Pin::new_unchecked(&mut future) };
Copy link
Contributor

Choose a reason for hiding this comment

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

#1890 does this without unsafe.

@seanmonstar
Copy link
Member

Thanks for the PR! There were early PRs that did this, so I'm going to merge them, I was just slow as I was on vacation.

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.

3 participants