Skip to content

Commit d078b74

Browse files
committed
Small clean up
1 parent ca13b87 commit d078b74

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

examples/client.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use async_h1::{client, Body};
22
use async_std::{io, net, task};
3-
use http::Response;
43

54
fn main() -> Result<(), async_h1::Exception> {
65
task::block_on(async {
@@ -9,8 +8,8 @@ fn main() -> Result<(), async_h1::Exception> {
98
let body = Body::from_string("hello chashu".to_owned());
109
let mut req = client::encode(http::Request::new(body)).await?;
1110
io::copy(&mut req, writer).await?;
12-
let res: Response<Body<io::BufReader<&mut &async_std::net::TcpStream>>> = client::decode(reader).await?;
11+
let res = client::decode(reader).await?;
1312
println!("Response {:?}", res);
14-
Ok::<(), async_h1::Exception>(())
13+
Ok(())
1514
})
1615
}

examples/server.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ fn main() -> Result<(), async_h1::Exception> {
1414
let (reader, writer) = &mut (&stream, &stream);
1515
let req = server::decode(reader).await?;
1616
if req.is_some() {
17+
// dbg!(req);
1718
let body = Body::from_string("hello chashu".to_owned());
1819
let mut res = server::encode(http::Response::new(body)).await?;
1920
io::copy(&mut res, writer).await?;

0 commit comments

Comments
 (0)