Skip to content

Commit f24f32d

Browse files
committed
cargo fmt
1 parent a43e752 commit f24f32d

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

examples/client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use async_h1::client;
2-
use async_std::net::{TcpStream};
2+
use async_std::net::TcpStream;
33
use http_types::{Error, Method, Request, Url};
44

55
#[async_std::main]

examples/server.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use async_std::net::{TcpStream, TcpListener};
1+
use async_std::net::{TcpListener, TcpStream};
22
use async_std::prelude::*;
33
use async_std::task;
44
use http_types::{Response, StatusCode};

src/lib.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@
3030
//! use async_h1::client;
3131
//! use async_std::net::{TcpStream};
3232
//! use http_types::{Error, Method, Request, Url};
33-
//!
33+
//!
3434
//! #[async_std::main]
3535
//! async fn main() -> Result<(), Error> {
3636
//! let stream = TcpStream::connect("127.0.0.1:8080").await?;
3737
//! let peer_addr = stream.peer_addr()?;
3838
//! println!("connecting to {}", peer_addr);
39-
//!
39+
//!
4040
//! for i in 0usize..2 {
4141
//! println!("making request {}/2", i + 1);
4242
//! let url = Url::parse(&format!("http://{}/foo", peer_addr)).unwrap();
@@ -55,14 +55,14 @@
5555
//! use async_std::prelude::*;
5656
//! use async_std::task;
5757
//! use http_types::{Response, StatusCode};
58-
//!
58+
//!
5959
//! #[async_std::main]
6060
//! async fn main() -> http_types::Result<()> {
6161
//! // Open up a TCP connection and create a URL.
6262
//! let listener = TcpListener::bind(("127.0.0.1", 8080)).await?;
6363
//! let addr = format!("http://{}", listener.local_addr()?);
6464
//! println!("listening on {}", addr);
65-
//!
65+
//!
6666
//! // For each incoming TCP connection, spawn a task and call `accept`.
6767
//! let mut incoming = listener.incoming();
6868
//! while let Some(stream) = incoming.next().await {
@@ -76,7 +76,7 @@
7676
//! }
7777
//! Ok(())
7878
//! }
79-
//!
79+
//!
8080
//! // Take a TCP stream, and convert it into sequential HTTP request / response pairs.
8181
//! async fn accept(addr: String, stream: TcpStream) -> http_types::Result<()> {
8282
//! println!("starting new connection from {}", stream.peer_addr()?);
@@ -99,9 +99,9 @@
9999
/// The maximum amount of headers parsed on the server.
100100
const MAX_HEADERS: usize = 128;
101101

102-
mod server;
103102
mod chunked;
104103
mod date;
104+
mod server;
105105

106106
#[doc(hidden)]
107107
pub mod client;

0 commit comments

Comments
 (0)