Prune futures-* dependencies

This commit is contained in:
Sean McArthur
2019-08-30 13:50:04 -07:00
parent 678c90eb0a
commit 2d90efee17
13 changed files with 37 additions and 64 deletions

View File

@@ -6,7 +6,7 @@ use crate::frame::DEFAULT_INITIAL_WINDOW_SIZE;
use crate::proto::*;
use bytes::{Bytes, IntoBuf};
use futures::{ready, Stream};
use futures_core::Stream;
use std::io;
use std::marker::PhantomData;
use std::pin::Pin;

View File

@@ -3,12 +3,12 @@ use crate::frame::Ping;
use crate::proto::{self, PingPayload};
use bytes::Buf;
use futures::task::AtomicWaker;
use std::io;
use std::sync::atomic::{AtomicUsize, Ordering};
use std::sync::Arc;
use std::task::{Context, Poll};
use tokio_io::AsyncWrite;
use tokio_sync::AtomicWaker;
/// Acknowledges ping requests from the remote.
#[derive(Debug)]
@@ -190,7 +190,7 @@ impl PingPong {
.state
.store(USER_STATE_PENDING_PONG, Ordering::Release);
} else {
users.0.ping_task.register(cx.waker());
users.0.ping_task.register_by_ref(cx.waker());
}
}
@@ -233,7 +233,7 @@ impl UserPings {
pub(crate) fn poll_pong(&self, cx: &mut Context) -> Poll<Result<(), proto::Error>> {
// Must register before checking state, in case state were to change
// before we could register, and then the ping would just be lost.
self.0.pong_task.register(cx.waker());
self.0.pong_task.register_by_ref(cx.waker());
let prev = self.0.state.compare_and_swap(
USER_STATE_RECEIVED_PONG, // current
USER_STATE_EMPTY, // new

View File

@@ -7,7 +7,6 @@ use crate::codec::UserError;
use crate::codec::UserError::*;
use bytes::buf::Take;
use futures::ready;
use std::io;
use std::task::{Context, Poll, Waker};
use std::{cmp, fmt, mem};

View File

@@ -4,7 +4,6 @@ use crate::frame::{Reason, DEFAULT_INITIAL_WINDOW_SIZE};
use crate::{frame, proto};
use std::task::Context;
use futures::ready;
use http::{HeaderMap, Method, Request, Response};
use std::io;

View File

@@ -7,7 +7,6 @@ use crate::proto::{peer, Open, Peer, WindowSize};
use crate::{client, proto, server};
use bytes::{Buf, Bytes};
use futures::ready;
use http::{HeaderMap, Request, Response};
use std::task::{Context, Poll, Waker};
use tokio_io::AsyncWrite;