diff --git a/README.md b/README.md index ae63f605b..e8f93a92b 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Actix web is a simple, pragmatic and extremely fast web framework for Rust. [CSRF](https://actix.github.io/actix-web/actix_web/middleware/csrf/index.html)) * Built on top of [Actix actor framework](https://github.com/actix/actix) -## Documentation +## Documentation & community resources * [User Guide](http://actix.github.io/actix-web/guide/) * [API Documentation (Development)](http://actix.github.io/actix-web/actix_web/) @@ -31,26 +31,18 @@ Actix web is a simple, pragmatic and extremely fast web framework for Rust. ## Example -At the moment all examples are based on the actix-web `master` branch. - -```toml -[dependencies] -actix = "0.5" -actix-web = { git="https://github.com/actix/actix-web.git" } -``` - ```rust extern crate actix_web; use actix_web::{server, App, Path}; -fn index(info: Path<(String, u32)>) -> String { +fn index(info: Path<(u32, String)>) -> String { format!("Hello {}! id:{}", info.0, info.1) } fn main() { server::new( || App::new() - .resource("/{name}/{id}/index.html", |r| r.with(index))) + .resource("/{id}/{name}/index.html", |r| r.with(index))) .bind("127.0.0.1:8080").unwrap() .run(); } diff --git a/guide/src/qs_2.md b/guide/src/qs_2.md index 524c2c1de..8f3ec3923 100644 --- a/guide/src/qs_2.md +++ b/guide/src/qs_2.md @@ -17,7 +17,7 @@ contains the following: ```toml [dependencies] actix = "0.5" -actix-web = { git="https://github.com/actix/actix-web.git" } +actix-web = "0.5" ``` In order to implement a web server, we first need to create a request handler. diff --git a/src/server/shared.rs b/src/server/shared.rs index bb3269c05..6773abcda 100644 --- a/src/server/shared.rs +++ b/src/server/shared.rs @@ -39,7 +39,7 @@ pub(crate) struct SharedBytes( impl Drop for SharedBytes { fn drop(&mut self) { - if let Some(ref pool) = self.1 { + if let Some(pool) = self.1.take() { if let Some(bytes) = self.0.take() { if Rc::strong_count(&bytes) == 1 { pool.release_bytes(bytes);