diff --git a/README.md b/README.md index db7d57d2..7933dd19 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ fn main() { ## Features - * Supported HTTP/1 and HTTP/2 protocols + * Supported *HTTP/1.x* and *HTTP/2.0* protocols * Streaming and pipelining * Keep-alive and slow requests handling * [WebSockets](https://actix.github.io/actix-web/actix_web/ws/index.html) diff --git a/src/lib.rs b/src/lib.rs index ce50edcb..062e6220 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,4 +1,37 @@ //! Actix web is a small, fast, down-to-earth, open source rust web framework. +//! +//! ```rust,ignore +//! use actix_web::*; +//! +//! fn index(req: HttpRequest) -> String { +//! format!("Hello {}!", &req.match_info()["name"]) +//! } +//! +//! fn main() { +//! HttpServer::new( +//! || Application::new() +//! .resource("/{name}", |r| r.f(index))) +//! .serve::<_, ()>("127.0.0.1:8080"); +//! } +//! ``` +//! +//! ## Documentation +//! +//! * [User Guide](http://actix.github.io/actix-web/guide/) +//! * Cargo package: [actix-web](https://crates.io/crates/actix-web) +//! * Minimum supported Rust version: 1.20 or later +//! +//! ## Features +//! +//! * Supported *HTTP/1.x* and *HTTP/2.0* protocols +//! * Streaming and pipelining +//! * Keep-alive and slow requests handling +//! * `WebSockets` +//! * Transparent content compression/decompression (br, gzip, deflate) +//! * Configurable request routing +//! * Multipart streams +//! * Middlewares (`Logger`, `Session`, `DefaultHeaders`) +//! * Built on top of [Actix](https://github.com/actix/actix). #![cfg_attr(actix_nightly, feature( specialization, // for impl ErrorResponse for std::error::Error diff --git a/src/server.rs b/src/server.rs index 4fdd6bd7..c85f0a72 100644 --- a/src/server.rs +++ b/src/server.rs @@ -401,7 +401,7 @@ impl Handler, io::Error> for HttpServer } } -/// Http workers +/// Http worker /// /// Worker accepts Socket objects via unbounded channel and start requests processing. struct Worker {