Skip to content

Commit e83617c

Browse files
update deps
1 parent aa31c7f commit e83617c

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

Cargo.toml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,13 @@ edition = "2018"
1414
[dependencies]
1515
url = "2.1.0"
1616
httparse = "1.3.3"
17-
futures-io = "0.3.0"
18-
async-std = { version = "1", features = ["unstable"] }
19-
futures-core-preview = "0.3.0-alpha.18"
17+
async-std = { version = "1.4.0", features = ["unstable"] }
2018
http-types = { path = '../http-types' }
2119
thiserror = "1.0.9"
2220
pin-project-lite = "0.1.1"
2321
byte-pool = "0.2.1"
2422
lazy_static = "1.4.0"
23+
futures-core = "0.3.1"
2524

2625
[dev-dependencies]
27-
futures-util = "0.3.0"
2826
pretty_assertions = "0.6.1"

src/check.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
use futures_io::AsyncRead;
1+
use async_std::io::Read;
22

33
/// Check if the protocol for a stream is HTTP/1.1
4-
pub async fn check(_reader: &mut impl AsyncRead) -> bool {
4+
pub async fn check(_reader: &mut impl Read) -> bool {
55
unimplemented!();
66
}

src/client.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
//! Process HTTP connections on the client.
22
3-
use async_std::io::{self, BufReader};
3+
use async_std::io::{self, BufReader, Read};
44
use async_std::prelude::*;
55
use async_std::task::{Context, Poll};
66
use futures_core::ready;
7-
use futures_io::AsyncRead;
87
use http_types::{
98
headers::{HeaderName, HeaderValue, CONTENT_LENGTH},
109
Body, Request, Response, StatusCode,
@@ -85,7 +84,7 @@ pub async fn encode(req: Request) -> Result<Encoder, std::io::Error> {
8584
/// Decode an HTTP respons on the client.
8685
pub async fn decode<R>(reader: R) -> Result<Response, Exception>
8786
where
88-
R: AsyncRead + Unpin + Send + 'static,
87+
R: Read + Unpin + Send + 'static,
8988
{
9089
let mut reader = BufReader::new(reader);
9190
let mut buf = Vec::new();
@@ -148,7 +147,7 @@ where
148147
Ok(res)
149148
}
150149

151-
impl AsyncRead for Encoder {
150+
impl Read for Encoder {
152151
fn poll_read(
153152
mut self: Pin<&mut Self>,
154153
cx: &mut Context<'_>,

0 commit comments

Comments
 (0)